mirror of https://github.com/vuejs/core.git
workflow: fix size report
This commit is contained in:
parent
67cdb5f335
commit
765abf8c4a
|
@ -44,16 +44,20 @@ jobs:
|
||||||
|
|
||||||
- name: Read PR Number
|
- name: Read PR Number
|
||||||
id: pr-number
|
id: pr-number
|
||||||
run: echo "number=(cat ./temp/size/number.txt)" >> $GITHUB_OUTPUT
|
uses: juliangruber/read-file-action@v1
|
||||||
|
with:
|
||||||
|
path: temp/size/number.txt
|
||||||
|
|
||||||
- name: Read base branch
|
- name: Read base branch
|
||||||
id: pr-base
|
id: pr-base
|
||||||
run: echo "base=(cat ./temp/size/base.txt)" >> $GITHUB_OUTPUT
|
uses: juliangruber/read-file-action@v1
|
||||||
|
with:
|
||||||
|
path: temp/size/base.txt
|
||||||
|
|
||||||
- name: Download Previous Size Data
|
- name: Download Previous Size Data
|
||||||
uses: dawidd6/action-download-artifact@v6
|
uses: dawidd6/action-download-artifact@v6
|
||||||
with:
|
with:
|
||||||
branch: ${{ steps.pr-base.outputs.base }}
|
branch: ${{ steps.pr-base.outputs.content }}
|
||||||
workflow: size-data.yml
|
workflow: size-data.yml
|
||||||
event: push
|
event: push
|
||||||
name: size-data
|
name: size-data
|
||||||
|
@ -73,7 +77,7 @@ jobs:
|
||||||
uses: actions-cool/maintain-one-comment@v3
|
uses: actions-cool/maintain-one-comment@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
number: ${{ steps.pr-number.outputs.number }}
|
number: ${{ steps.pr-number.outputs.content }}
|
||||||
body: |
|
body: |
|
||||||
${{ steps.size-report.outputs.content }}
|
${{ steps.size-report.outputs.content }}
|
||||||
<!-- VUE_CORE_SIZE -->
|
<!-- VUE_CORE_SIZE -->
|
||||||
|
|
|
@ -31,7 +31,8 @@ async function run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function renderFiles() {
|
async function renderFiles() {
|
||||||
const filterFiles = (files: string[]) => files.filter(file => file[0] !== '_')
|
const filterFiles = (files: string[]) =>
|
||||||
|
files.filter(file => file[0] !== '_' && !file.endsWith('.txt'))
|
||||||
|
|
||||||
const curr = filterFiles(await readdir(currDir))
|
const curr = filterFiles(await readdir(currDir))
|
||||||
const prev = existsSync(prevDir) ? filterFiles(await readdir(prevDir)) : []
|
const prev = existsSync(prevDir) ? filterFiles(await readdir(prevDir)) : []
|
||||||
|
|
Loading…
Reference in New Issue