diff --git a/.github/workflows/track_fork_pr_benchmarks.yml b/.github/workflows/track_fork_pr_benchmarks.yml index 6f8e12f..134b9a9 100644 --- a/.github/workflows/track_fork_pr_benchmarks.yml +++ b/.github/workflows/track_fork_pr_benchmarks.yml @@ -14,36 +14,15 @@ jobs: PR_EVENT: event.json steps: - name: Download Benchmark Results - uses: actions/github-script@v7 + uses: dawidd6/action-download-artifact@v6 with: - script: | - async function downloadArtifact(artifactName) { - let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: context.payload.workflow_run.id, - }); - let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { - return artifact.name == artifactName - })[0]; - if (!matchArtifact) { - core.setFailed(`Failed to find artifact: ${artifactName}`); - } - let download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - let fs = require('fs'); - fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/${artifactName}.zip`, Buffer.from(download.data)); - } - await downloadArtifact(process.env.BENCHMARK_RESULTS); - await downloadArtifact(process.env.PR_EVENT); - - name: Unzip Benchmark Results - run: | - unzip $BENCHMARK_RESULTS.zip - unzip $PR_EVENT.zip + name: ${{ env.BENCHMARK_RESULTS }} + run_id: ${{ github.event.workflow_run.id }} + - name: Download PR Event + uses: dawidd6/action-download-artifact@v6 + with: + name: ${{ env.PR_EVENT }} + run_id: ${{ github.event.workflow_run.id }} - name: Export PR Event Data uses: actions/github-script@v7 with: