File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 2222 - name : Checkout code
2323 uses : actions/checkout@v3.0.2
2424 - name : Download Resyntax analysis
25- uses : actions/download-artifact@v3.0.0
25+ # This uses a github script instead of the download-artifact action because
26+ # that action doesn't work for artifacts uploaded by other workflows. See
27+ # https://github.com/actions/download-artifact/issues/130 for more info.
28+ uses : actions/github-script@v6.1.0
2629 with :
27- name : resyntax-review
30+ script : |
31+ var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
32+ owner: context.repo.owner,
33+ repo: context.repo.repo,
34+ run_id: ${{github.event.workflow_run.id }},
35+ });
36+ var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
37+ return artifact.name == "resyntax-review"
38+ })[0];
39+ var download = await github.rest.actions.downloadArtifact({
40+ owner: context.repo.owner,
41+ repo: context.repo.repo,
42+ artifact_id: matchArtifact.id,
43+ archive_format: 'zip',
44+ });
45+ var fs = require('fs');
46+ fs.writeFileSync('${{github.workspace}}/resyntax-review.zip', Buffer.from(download.data));
47+ - run : unzip resyntax-review.zip
2848 - name : Create pull request review
2949 uses : actions/github-script@v6.1.0
3050 with :
You can’t perform that action at this time.
0 commit comments