File tree Expand file tree Collapse file tree 4 files changed +10
-40
lines changed Expand file tree Collapse file tree 4 files changed +10
-40
lines changed Original file line number Diff line number Diff line change @@ -12,26 +12,11 @@ jobs:
12
12
runs-on : ubuntu-latest
13
13
14
14
steps :
15
- - name : Download artifact
16
-
15
+ - uses : actions/download-artifact@v4
17
16
with :
18
- script : |
19
- var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
20
- owner: context.repo.owner,
21
- repo: context.repo.repo,
22
- run_id: ${{github.event.workflow_run.id }},
23
- });
24
- var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
25
- return artifact.name == "PR"
26
- })[0];
27
- var download = await github.rest.actions.downloadArtifact({
28
- owner: context.repo.owner,
29
- repo: context.repo.repo,
30
- artifact_id: matchArtifact.id,
31
- archive_format: 'zip',
32
- });
33
- var fs = require('fs');
34
- fs.writeFileSync('${{github.workspace}}/PR.zip', Buffer.from(download.data));
17
+ name : PR
18
+ github-token : ${{ github.token }}
19
+ run-id : ${{ github.event.workflow_run.id }}
35
20
36
21
- run : unzip PR.zip
37
22
Original file line number Diff line number Diff line change 13
13
mkdir PR
14
14
echo ${{ github.event.number }} > ./PR/PR_NUMBER
15
15
16
- - uses : actions/upload-artifact@v3
16
+ - uses : actions/upload-artifact@v4
17
17
with :
18
18
name : PR
19
19
path : PR/
Original file line number Diff line number Diff line change 55
55
- run : |
56
56
tar zcvf site.tar.gz -C site .
57
57
58
- - uses : actions/upload-artifact@v3
58
+ - uses : actions/upload-artifact@v4
59
59
with :
60
60
name : site.tar.gz
61
61
path : site.tar.gz
Original file line number Diff line number Diff line change @@ -12,26 +12,11 @@ jobs:
12
12
runs-on : ubuntu-latest
13
13
14
14
steps :
15
- - name : Download artifact
16
-
15
+ - uses : actions/download-artifact@v4
17
16
with :
18
- script : |
19
- var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
20
- owner: context.repo.owner,
21
- repo: context.repo.repo,
22
- run_id: ${{github.event.workflow_run.id }},
23
- });
24
- var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
25
- return artifact.name == "site.tar.gz"
26
- })[0];
27
- var download = await github.rest.actions.downloadArtifact({
28
- owner: context.repo.owner,
29
- repo: context.repo.repo,
30
- artifact_id: matchArtifact.id,
31
- archive_format: 'zip',
32
- });
33
- var fs = require('fs');
34
- fs.writeFileSync('${{github.workspace}}/site.tar.gz.zip', Buffer.from(download.data));
17
+ name : site.tar.gz
18
+ github-token : ${{ github.token }}
19
+ run-id : ${{ github.event.workflow_run.id }}
35
20
36
21
- run : |
37
22
unzip site.tar.gz.zip
You can’t perform that action at this time.
0 commit comments