Skip to content

Commit e331b8a

Browse files
committed
ci: try conditional instead
1 parent 0821d5d commit e331b8a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/size.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: size
22
on:
33
# this action will error unless run in a pr context
4+
pull_request_target:
5+
branches:
6+
- main
47
pull_request:
58
branches:
69
- main
@@ -18,8 +21,14 @@ jobs:
1821
contents: read
1922
steps:
2023
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
24+
if: github.event_name == 'pull_request'
2125
with:
2226
ref: ${{ github.event.pull_request.head.sha }}
27+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
28+
if: github.event_name == 'pull_request_target'
29+
with:
30+
ref: ${{ github.event.pull_request.head.ref }}
31+
repository: ${{ github.event.pull_request.head.repo.full_name }}
2332
- run: npm i -g --force corepack && corepack enable
2433
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
2534
with:

0 commit comments

Comments
 (0)