11name : size report
22
33on :
4- workflow_run :
5- workflows : ['size data']
6- types :
7- - completed
4+ pull_request :
5+ branches :
6+ - main
7+ - minor
88
99permissions :
1010 contents : read
1717jobs :
1818 size-report :
1919 runs-on : ubuntu-latest
20- if : >
21- github.event.workflow_run.event == 'pull_request' &&
22- github.event.workflow_run.conclusion == 'success'
2320 steps :
2421 - uses : actions/checkout@v4
2522
@@ -35,36 +32,12 @@ jobs:
3532 - name : Install dependencies
3633 run : pnpm install
3734
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
6336
6437 - name : Download Previous Size Data
6538 uses : dawidd6/action-download-artifact@v6
6639 with :
67- branch : ${{ steps.pr-base.outputs.content }}
40+ branch : ${{ github.base_ref }}
6841 workflow : size-data.yml
6942 event : push
7043 name : size-data
8457 uses : actions-cool/maintain-one-comment@v3
8558 with :
8659 token : ${{ secrets.GITHUB_TOKEN }}
87- number : ${{ steps.pr-number.outputs.content }}
60+ number : ${{ github.event.number }}
8861 body : |
8962 ${{ steps.size-report.outputs.content }}
9063 <!-- VUE_CORE_SIZE -->
0 commit comments