Skip to content

Commit 3daa048

Browse files
committed
ci: set the checkout to PR head instead of merge
1 parent ecccff9 commit 3daa048

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ jobs:
3030
steps:
3131
- name: Checkout code
3232
uses: actions/checkout@v4
33-
# No ref parameter needed - uses correct ref automatically:
34-
# - For PRs: merge commit (PR changes + latest main)
35-
# - For pushes: the pushed commit
33+
with:
34+
# - For PRs: PR head commit
35+
# - For pushes: the pushed commit
36+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
37+
3638

3739
- name: Setup Node.js
3840
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)