From 53b72a2507172f9160bf482658ec694682921079 Mon Sep 17 00:00:00 2001 From: Archez Date: Tue, 19 Nov 2024 18:18:18 -0500 Subject: [PATCH] Update PR artifacts actions and exclude soh.otr (#4558) * update pr artifacts actions and exclude soh.otr * remove deprecated save-always for windows cache --- .github/workflows/generate-builds.yml | 1 - .github/workflows/pr-artifacts.yml | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate-builds.yml b/.github/workflows/generate-builds.yml index 29cd94c8a..85eeaf4d9 100644 --- a/.github/workflows/generate-builds.yml +++ b/.github/workflows/generate-builds.yml @@ -244,7 +244,6 @@ jobs: - name: Cache build folder uses: actions/cache@v4 with: - save-always: true key: ${{ runner.os }}-build-${{ github.ref }}-${{ github.sha }} restore-keys: | ${{ runner.os }}-build-${{ github.ref }} diff --git a/.github/workflows/pr-artifacts.yml b/.github/workflows/pr-artifacts.yml index 43b985b5d..85db7de59 100644 --- a/.github/workflows/pr-artifacts.yml +++ b/.github/workflows/pr-artifacts.yml @@ -12,7 +12,7 @@ jobs: if: ${{ github.event.workflow_run.event == 'pull_request' }} steps: - id: 'pr-number' - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: result-encoding: string script: | @@ -20,8 +20,9 @@ jobs: const pullHeadSHA = '${{github.event.workflow_run.head_sha}}'; const pullUserId = ${{github.event.sender.id}}; const prNumber = await (async () => { - const pulls = await github.rest.pulls.list({owner, repo}); - for await (const {data} of github.paginate.iterator(pulls)) { + for await (const { data } of github.paginate.iterator( + github.rest.pulls.list, { owner, repo } + )) { for (const pull of data) { if (pull.head.sha === pullHeadSHA && pull.user.id === pullUserId) { return pull.number; @@ -36,7 +37,7 @@ jobs: return prNumber; - id: 'artifacts-text' - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: result-encoding: string script: | @@ -47,13 +48,13 @@ jobs: }); return allArtifacts.data.artifacts.reduce((acc, item) => { - if (item.name === "assets") return acc; + if (item.name === "soh.otr") return acc; acc += ` - [${item.name}.zip](https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/artifacts/${item.id}.zip)`; return acc; }, '### Build Artifacts'); - id: 'add-to-pr' - uses: garrettjoecox/pr-section@3.1.0 + uses: garrettjoecox/pr-section@4.0.0 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' pr-number: ${{ steps.pr-number.outputs.result }}