Skip to content

Commit 39d4fc1

Browse files
committed
ci: fix size report permissions
1 parent 1b56405 commit 39d4fc1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/size-report.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: size report
22

33
on:
4+
push:
5+
branches:
6+
- main
47
pull_request:
58
branches:
69
- main
710

811
permissions:
912
contents: read
10-
pull-requests: write
1113

1214
jobs:
1315
size:
@@ -31,6 +33,7 @@ jobs:
3133
- name: Download Previous Size Report
3234
id: download-artifact
3335
uses: dawidd6/action-download-artifact@v2
36+
if: ${{github.event_name == 'pull_request'}}
3437
with:
3538
branch: main
3639
name: size-report
@@ -45,16 +48,20 @@ jobs:
4548

4649
- name: Compare size
4750
run: pnpm tsx scripts/size-report.ts > size.md
51+
if: ${{github.event_name == 'pull_request'}}
4852

4953
- name: Read Size Markdown
5054
id: size-markdown
5155
uses: juliangruber/read-file-action@v1
56+
if: ${{github.event_name == 'pull_request'}}
5257
with:
5358
path: ./size.md
5459

5560
- name: Create Comment
5661
uses: actions-cool/maintain-one-comment@v3
62+
if: ${{github.event_name == 'pull_request'}}
5763
with:
64+
token: ${{ secrets.ECOSYSTEM_CI_ACCESS_TOKEN }}
5865
body: |
5966
${{steps.size-markdown.outputs.content}}
6067
<!-- VUE_CORE_SIZE -->

0 commit comments

Comments
 (0)