Skip to content

Commit 32a1433

Browse files
committed
workflow: fix size report base branch
1 parent 236fb7a commit 32a1433

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/size-data.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,16 @@ jobs:
4343
name: size-data
4444
path: temp/size
4545

46-
- name: Save PR number
46+
- name: Save PR number & base branch
4747
if: ${{github.event_name == 'pull_request'}}
48-
run: echo ${{ github.event.number }} > ./pr.txt
48+
run: |
49+
echo ${{ github.event.number }} > ./number.txt
50+
echo ${{ github.base_ref }} > ./base.txt
4951
5052
- uses: actions/upload-artifact@v4
5153
if: ${{github.event_name == 'pull_request'}}
5254
with:
53-
name: pr-number
54-
path: pr.txt
55+
name: pr-info
56+
path: |
57+
number.txt
58+
base.txt

.github/workflows/size-report.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,24 @@ jobs:
3535
- name: Install dependencies
3636
run: pnpm install
3737

38-
- name: Download PR number
38+
- name: Download PR info
3939
uses: dawidd6/action-download-artifact@v6
4040
with:
41-
name: pr-number
41+
name: pr-info
4242
run_id: ${{ github.event.workflow_run.id }}
43-
path: /tmp/pr-number
43+
path: /tmp/pr-info
4444

4545
- name: Read PR Number
4646
id: pr-number
4747
uses: juliangruber/read-file-action@v1
4848
with:
49-
path: /tmp/pr-number/pr.txt
49+
path: /tmp/pr-info/number.txt
50+
51+
- name: Read PR base branch
52+
id: pr-base
53+
uses: juliangruber/read-file-action@v1
54+
with:
55+
path: /tmp/pr-info/base.txt
5056

5157
- name: Download Size Data
5258
uses: dawidd6/action-download-artifact@v6
@@ -58,7 +64,7 @@ jobs:
5864
- name: Download Previous Size Data
5965
uses: dawidd6/action-download-artifact@v6
6066
with:
61-
branch: ${{ github.base_ref }}
67+
branch: ${{ steps.pr-base.outputs.content }}
6268
workflow: size-data.yml
6369
event: push
6470
name: size-data

0 commit comments

Comments
 (0)