File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 27
27
echo ${{ github.event.pull_request.state }} >> ./pr/pr_state
28
28
echo ${{ github.event.pull_request.head.sha }} >> ./pr/head_sha
29
29
echo ${{ github.event.action }} >> ./pr/event_action
30
- - uses : actions/upload-artifact@v3
30
+ - uses : actions/upload-artifact@v4
31
31
with :
32
32
name : pr
33
33
path : pr/
Original file line number Diff line number Diff line change @@ -24,24 +24,24 @@ jobs:
24
24
event_action : ${{ steps.vars.outputs.event_action }}
25
25
steps :
26
26
- name : ' Download artifact'
27
- uses : actions/github-script@v3.1.0
27
+ uses : actions/github-script@v6
28
28
with :
29
29
script : |
30
- var artifacts = await github.actions.listWorkflowRunArtifacts({
30
+ let allArtifacts = await github.rest .actions.listWorkflowRunArtifacts({
31
31
owner: context.repo.owner,
32
32
repo: context.repo.repo,
33
33
run_id: ${{github.event.workflow_run.id }},
34
34
});
35
- var matchArtifact = artifacts .data.artifacts.filter((artifact) => {
35
+ let matchArtifact = allArtifacts .data.artifacts.filter((artifact) => {
36
36
return artifact.name == "pr"
37
37
})[0];
38
- var download = await github.actions.downloadArtifact({
38
+ let download = await github.rest .actions.downloadArtifact({
39
39
owner: context.repo.owner,
40
40
repo: context.repo.repo,
41
41
artifact_id: matchArtifact.id,
42
42
archive_format: 'zip',
43
43
});
44
- var fs = require('fs');
44
+ let fs = require('fs');
45
45
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
46
46
- run : unzip pr.zip
47
47
- shell : bash
Original file line number Diff line number Diff line change @@ -25,21 +25,21 @@ jobs:
25
25
26
26
with :
27
27
script : |
28
- var artifacts = await github.actions.listWorkflowRunArtifacts({
28
+ let allArtifacts = await github.rest .actions.listWorkflowRunArtifacts({
29
29
owner: context.repo.owner,
30
30
repo: context.repo.repo,
31
31
run_id: ${{github.event.workflow_run.id }},
32
32
});
33
- var matchArtifact = artifacts .data.artifacts.filter((artifact) => {
33
+ let matchArtifact = allArtifacts .data.artifacts.filter((artifact) => {
34
34
return artifact.name == "pr"
35
35
})[0];
36
- var download = await github.actions.downloadArtifact({
36
+ let download = await github.rest .actions.downloadArtifact({
37
37
owner: context.repo.owner,
38
38
repo: context.repo.repo,
39
39
artifact_id: matchArtifact.id,
40
40
archive_format: 'zip',
41
41
});
42
- var fs = require('fs');
42
+ let fs = require('fs');
43
43
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
44
44
- run : unzip pr.zip
45
45
- shell : bash
You can’t perform that action at this time.
0 commit comments