@@ -15,38 +15,18 @@ jobs:
15
15
runs-on : ubuntu-22.04
16
16
if : github.event.workflow_run.event == 'pull_request'
17
17
steps :
18
- # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
19
- - name : ' Download render-test-result artifact'
20
- uses : actions/github-script@v6
18
+ - uses : .github/actions/download-workflow-run-artifact
21
19
with :
22
- script : |
23
- let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
24
- owner: context.repo.owner,
25
- repo: context.repo.repo,
26
- run_id: context.payload.workflow_run.id,
27
- });
28
- let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
29
- return artifact.name == "render-test-result"
30
- })[0];
31
- let download = await github.rest.actions.downloadArtifact({
32
- owner: context.repo.owner,
33
- repo: context.repo.repo,
34
- artifact_id: matchArtifact.id,
35
- archive_format: 'zip',
36
- });
37
- let fs = require('fs');
38
- fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/render-test-result.zip`, Buffer.from(download.data));
39
-
20
+ artifact-name : render-test-result
21
+ expect-files : " ./pr_number, metrics/linux-gcc8-release-style.html"
22
+
40
23
- name : Configure AWS Credentials
41
24
uses : aws-actions/configure-aws-credentials@v2
42
25
with :
43
26
aws-region : us-west-2
44
27
role-to-assume : ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
45
28
role-session-name : ${{ github.run_id }}
46
29
47
- - name : ' Unzip render-test-result artifact'
48
- run : unzip render-test-result.zip
49
-
50
30
- name : Upload render test results to S3
51
31
id : upload_render_test_results
52
32
run : |
0 commit comments