@@ -14,36 +14,15 @@ jobs:
14
14
PR_EVENT : event.json
15
15
steps :
16
16
- name : Download Benchmark Results
17
- uses : actions/github-script@v7
17
+ uses : dawidd6/action-download-artifact@v6
18
18
with :
19
- script : |
20
- async function downloadArtifact(artifactName) {
21
- let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
22
- owner: context.repo.owner,
23
- repo: context.repo.repo,
24
- run_id: context.payload.workflow_run.id,
25
- });
26
- let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
27
- return artifact.name == artifactName
28
- })[0];
29
- if (!matchArtifact) {
30
- core.setFailed(`Failed to find artifact: ${artifactName}`);
31
- }
32
- let download = await github.rest.actions.downloadArtifact({
33
- owner: context.repo.owner,
34
- repo: context.repo.repo,
35
- artifact_id: matchArtifact.id,
36
- archive_format: 'zip',
37
- });
38
- let fs = require('fs');
39
- fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/${artifactName}.zip`, Buffer.from(download.data));
40
- }
41
- await downloadArtifact(process.env.BENCHMARK_RESULTS);
42
- await downloadArtifact(process.env.PR_EVENT);
43
- - name : Unzip Benchmark Results
44
- run : |
45
- unzip $BENCHMARK_RESULTS.zip
46
- unzip $PR_EVENT.zip
19
+ name : ${{ env.BENCHMARK_RESULTS }}
20
+ run_id : ${{ github.event.workflow_run.id }}
21
+ - name : Download PR Event
22
+ uses : dawidd6/action-download-artifact@v6
23
+ with :
24
+ name : ${{ env.PR_EVENT }}
25
+ run_id : ${{ github.event.workflow_run.id }}
47
26
- name : Export PR Event Data
48
27
uses : actions/github-script@v7
49
28
with :
0 commit comments