Skip to content

Commit 765abf8

Browse files
committed
workflow: fix size report
1 parent 67cdb5f commit 765abf8

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/size-report.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,20 @@ jobs:
4444

4545
- name: Read PR Number
4646
id: pr-number
47-
run: echo "number=(cat ./temp/size/number.txt)" >> $GITHUB_OUTPUT
47+
uses: juliangruber/read-file-action@v1
48+
with:
49+
path: temp/size/number.txt
4850

4951
- name: Read base branch
5052
id: pr-base
51-
run: echo "base=(cat ./temp/size/base.txt)" >> $GITHUB_OUTPUT
53+
uses: juliangruber/read-file-action@v1
54+
with:
55+
path: temp/size/base.txt
5256

5357
- name: Download Previous Size Data
5458
uses: dawidd6/action-download-artifact@v6
5559
with:
56-
branch: ${{ steps.pr-base.outputs.base }}
60+
branch: ${{ steps.pr-base.outputs.content }}
5761
workflow: size-data.yml
5862
event: push
5963
name: size-data
@@ -73,7 +77,7 @@ jobs:
7377
uses: actions-cool/maintain-one-comment@v3
7478
with:
7579
token: ${{ secrets.GITHUB_TOKEN }}
76-
number: ${{ steps.pr-number.outputs.number }}
80+
number: ${{ steps.pr-number.outputs.content }}
7781
body: |
7882
${{ steps.size-report.outputs.content }}
7983
<!-- VUE_CORE_SIZE -->

scripts/size-report.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ async function run() {
3131
}
3232

3333
async function renderFiles() {
34-
const filterFiles = (files: string[]) => files.filter(file => file[0] !== '_')
34+
const filterFiles = (files: string[]) =>
35+
files.filter(file => file[0] !== '_' && !file.endsWith('.txt'))
3536

3637
const curr = filterFiles(await readdir(currDir))
3738
const prev = existsSync(prevDir) ? filterFiles(await readdir(prevDir)) : []

0 commit comments

Comments
 (0)