@@ -132,8 +132,12 @@ jobs:
132132 BASE_ROOT_DIR : ${{ github.workspace }}
133133
134134 steps :
135- - name : Checkout
135+ - &CHECKOUT
136+ name : Checkout
136137 uses : actions/checkout@v5
138+ with :
139+ # Ensure the latest merged pull request state is used, even on re-runs.
140+ ref : &CHECKOUT_REF_TMPL ${{ github.event_name == 'pull_request' && github.ref || '' }}
137141
138142 - name : Clang version
139143 run : |
@@ -199,8 +203,7 @@ jobs:
199203 job-name : ' Windows native, fuzz, VS 2022'
200204
201205 steps :
202- - name : Checkout
203- uses : actions/checkout@v5
206+ - *CHECKOUT
204207
205208 - name : Configure Developer Command Prompt for Microsoft Visual C++
206209 # Using microsoft/setup-msbuild is not enough.
@@ -310,8 +313,7 @@ jobs:
310313 DANGER_CI_ON_HOST_FOLDERS : 1
311314
312315 steps :
313- - name : Checkout
314- uses : actions/checkout@v5
316+ - *CHECKOUT
315317
316318 - name : Configure environment
317319 uses : ./.github/actions/configure-environment
@@ -351,8 +353,7 @@ jobs:
351353 TEST_RUNNER_TIMEOUT_FACTOR : 40
352354
353355 steps :
354- - name : Checkout
355- uses : actions/checkout@v5
356+ - *CHECKOUT
356357
357358 - name : Download built executables
358359 uses : actions/download-artifact@v4
@@ -493,8 +494,7 @@ jobs:
493494 file-env : ' ./ci/test/00_setup_env_native_msan.sh'
494495
495496 steps :
496- - name : Checkout
497- uses : actions/checkout@v5
497+ - *CHECKOUT
498498
499499 - name : Configure environment
500500 uses : ./.github/actions/configure-environment
@@ -537,6 +537,7 @@ jobs:
537537 - name : Checkout
538538 uses : actions/checkout@v5
539539 with :
540+ ref : *CHECKOUT_REF_TMPL
540541 fetch-depth : 0
541542
542543 - name : Configure Docker
0 commit comments