File tree Expand file tree Collapse file tree 2 files changed +3
-20
lines changed Expand file tree Collapse file tree 2 files changed +3
-20
lines changed Original file line number Diff line number Diff line change 15
15
github.event.workflow_run.conclusion == 'success'
16
16
steps :
17
17
- name : " Download artifact"
18
- uses : actions/github-script@v3.1.0
18
+ uses : actions/download-artifact@v4
19
19
with :
20
- script : |
21
- var artifacts = await github.actions.listWorkflowRunArtifacts({
22
- owner: context.repo.owner,
23
- repo: context.repo.repo,
24
- run_id: ${{github.event.workflow_run.id }},
25
- });
26
- var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
27
- return artifact.name == "pr"
28
- })[0];
29
- var download = await github.actions.downloadArtifact({
30
- owner: context.repo.owner,
31
- repo: context.repo.repo,
32
- artifact_id: matchArtifact.id,
33
- archive_format: 'zip',
34
- });
35
- var fs = require('fs');
36
- fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
37
- - run : unzip pr.zip
20
+ run-id : ${{github.event.workflow_run.id }}
38
21
39
22
- name : " Save PR number to env.number"
40
23
run : echo "number=$(cat ./pr/NR)" >> $GITHUB_ENV
Original file line number Diff line number Diff line change 33
33
mkdir -p ./pr
34
34
echo ${{ github.event.number }} > ./pr/NR
35
35
36
- - uses : actions/upload-artifact@v3
36
+ - uses : actions/upload-artifact@v4
37
37
with :
38
38
name : pr
39
39
path : |
You can’t perform that action at this time.
0 commit comments