Skip to content

Commit 6e2cb2d

Browse files
committed
ci: Checkout the PR head, not the github merge commit
In the CI github action, checkout the PR head commit instead of the `actions/checkout@v2` default of the PR merge commit. The practical effect of this change is the exported artifacts snapshot suffix will contain the commit id of the last commit on the PR instead of the magic github generated merge commit.
1 parent 24c3c61 commit 6e2cb2d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ jobs:
8181
8282
- name: Checkout sources
8383
uses: actions/checkout@v2
84+
with:
85+
ref: ${{ github.event.pull_request.head.sha }}
8486

8587
- name: Setup maven cache
8688
uses: actions/cache@v2

0 commit comments

Comments
 (0)