1
1
name : size report
2
2
3
3
on :
4
- workflow_run :
5
- workflows : ['size data']
6
- types :
7
- - completed
4
+ pull_request :
5
+ branches :
6
+ - main
7
+ - minor
8
8
9
9
permissions :
10
10
contents : read
17
17
jobs :
18
18
size-report :
19
19
runs-on : ubuntu-latest
20
- if : >
21
- github.event.workflow_run.event == 'pull_request' &&
22
- github.event.workflow_run.conclusion == 'success'
23
20
steps :
24
21
- uses : actions/checkout@v4
25
22
@@ -35,36 +32,12 @@ jobs:
35
32
- name : Install dependencies
36
33
run : pnpm install
37
34
38
- - name : Download PR info
39
- uses : dawidd6/action-download-artifact@v6
40
- with :
41
- name : pr-info
42
- run_id : ${{ github.event.workflow_run.id }}
43
- path : /tmp/pr-info
44
-
45
- - name : Read PR Number
46
- id : pr-number
47
- uses : juliangruber/read-file-action@v1
48
- with :
49
- path : /tmp/pr-info/number.txt
50
-
51
- - name : Read PR base branch
52
- id : pr-base
53
- uses : juliangruber/read-file-action@v1
54
- with :
55
- path : /tmp/pr-info/base.txt
56
-
57
- - name : Download Size Data
58
- uses : dawidd6/action-download-artifact@v6
59
- with :
60
- name : size-data
61
- run_id : ${{ github.event.workflow_run.id }}
62
- path : temp/size
35
+ - run : pnpm run size
63
36
64
37
- name : Download Previous Size Data
65
38
uses : dawidd6/action-download-artifact@v6
66
39
with :
67
- branch : ${{ steps.pr-base.outputs.content }}
40
+ branch : ${{ github.base_ref }}
68
41
workflow : size-data.yml
69
42
event : push
70
43
name : size-data
84
57
uses : actions-cool/maintain-one-comment@v3
85
58
with :
86
59
token : ${{ secrets.GITHUB_TOKEN }}
87
- number : ${{ steps.pr-number.outputs.content }}
60
+ number : ${{ github.event.number }}
88
61
body : |
89
62
${{ steps.size-report.outputs.content }}
90
63
<!-- VUE_CORE_SIZE -->
0 commit comments