Skip to content

Commit

Permalink
ci: fix size report permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Aug 21, 2023
1 parent 1b56405 commit 39d4fc1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/size-report.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: size report

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read
pull-requests: write

jobs:
size:
Expand All @@ -31,6 +33,7 @@ jobs:
- name: Download Previous Size Report
id: download-artifact
uses: dawidd6/action-download-artifact@v2
if: ${{github.event_name == 'pull_request'}}
with:
branch: main
name: size-report
Expand All @@ -45,16 +48,20 @@ jobs:

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

- name: Read Size Markdown
id: size-markdown
uses: juliangruber/read-file-action@v1
if: ${{github.event_name == 'pull_request'}}
with:
path: ./size.md

- name: Create Comment
uses: actions-cool/maintain-one-comment@v3
if: ${{github.event_name == 'pull_request'}}
with:
token: ${{ secrets.ECOSYSTEM_CI_ACCESS_TOKEN }}
body: |
${{steps.size-markdown.outputs.content}}
<!-- VUE_CORE_SIZE -->
Expand Down

0 comments on commit 39d4fc1

Please sign in to comment.