Skip to content

Commit 5cd48e9

Browse files
authored
chore(ci): adopt validate-pr-number for consistency (#36067)
1 parent eab34e2 commit 5cd48e9

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/bundle-size-comment.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ jobs:
1212
permissions:
1313
pull-requests: write
1414
steps:
15+
- uses: actions/checkout@v6
16+
with:
17+
sparse-checkout: |
18+
.github
19+
1520
- name: Download artifact
1621
uses: actions/download-artifact@v7
1722
with:
@@ -22,12 +27,16 @@ jobs:
2227

2328
- name: Load PR number
2429
id: pr_number
25-
run: echo "id=$(cat pr.txt)" >> $GITHUB_OUTPUT
26-
working-directory: ./results
30+
uses: actions/github-script@v8
31+
with:
32+
result-encoding: string
33+
script: |
34+
const run = require('./.github/scripts/validate-pr-number');
35+
return run({ filePath: 'results/pr.txt' });
2736
2837
- name: 'Comment on PR'
2938
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
3039
with:
3140
header: bundle-size-report
32-
number: ${{ steps.pr_number.outputs.id }}
41+
number: ${{ steps.pr_number.outputs.result }}
3342
path: ./results/monosize-report.md

0 commit comments

Comments
 (0)