Skip to content

Commit 953d26f

Browse files
fix: use gh pr checkout to handle fork PRs in license-check workflow
Co-authored-by: SamMorrowDrums <[email protected]>
1 parent 587d829 commit 953d26f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/license-check.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ jobs:
2525
steps:
2626
- name: Check out code
2727
uses: actions/checkout@v6
28-
with:
29-
ref: ${{ github.head_ref }}
28+
29+
# Check out the actual PR branch so we can push changes back if needed
30+
- name: Check out PR branch
31+
env:
32+
GH_TOKEN: ${{ github.token }}
33+
run: gh pr checkout ${{ github.event.pull_request.number }}
3034

3135
- name: Set up Go
3236
uses: actions/setup-go@v6

0 commit comments

Comments
 (0)