File tree 2 files changed +31
-7
lines changed
2 files changed +31
-7
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,25 @@ jobs:
10
10
dist-files-size-diff :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - name : Download artifact
13
+ - name : Download dist-size-diff artifact
14
14
uses : actions/download-artifact@v4
15
15
with :
16
- name : dist-size-${{ github.event.number }}
16
+ name : dist-size-diff
17
+ run-id : ${{ github.event.workflow_run.id }}
18
+
19
+ - name : Download pr-number artifact
20
+ uses : actions/download-artifact@v4
21
+ with :
22
+ name : pr-number
23
+ run-id : ${{ github.event.workflow_run.id }}
24
+
25
+ - name : Read pr-number artifact to env var
26
+ id : read-pr-number
27
+ run : |
28
+ echo "::set-output name=pr-number::$(cat ./pr-number)"
17
29
18
30
- name : Comment on the pull request (if success)
19
- if : ${{ always() && steps.diff.conclusion == 'success' }}
20
31
uses : marocchino/sticky-pull-request-comment@v2
21
32
with :
22
- path : ./dist-size.md
33
+ number : ${{ steps.read-pr-number.outputs.pr-number }}
34
+ path : ./dist-size-diff.md
Original file line number Diff line number Diff line change @@ -59,10 +59,22 @@ jobs:
59
59
const diff = await main()
60
60
console.log(diff);
61
61
62
- fs.writeFileSync(process.env.GITHUB_WORKSPACE + '/dist-size.md', diff)
62
+ fs.writeFileSync(process.env.GITHUB_WORKSPACE + '/dist-size-diff .md', diff)
63
63
64
64
- name : Upload the diff
65
65
uses : actions/upload-artifact@v4
66
66
with :
67
- name : dist-size-${{ github.event.number }}
68
- path : ./dist-size.md
67
+ name : dist-size-diff
68
+ path : ./dist-size-diff.md
69
+
70
+ - name : Save PR number
71
+ env :
72
+ PR_NUMBER : ${{ github.event.number }}
73
+ run : |
74
+ echo $PR_NUMBER > ./pr-number
75
+
76
+ - name : Upload the PR number
77
+ uses : actions/upload-artifact@v4
78
+ with :
79
+ name : pr-number
80
+ path : ./pr-number
You can’t perform that action at this time.
0 commit comments