Skip to content

Commit 38a2189

Browse files
committed
Upgrade GfW in test-fixtures-windows too, without duplication
GitHub Actions has recently started supporting YAML anchors: - https://github.blog/changelog/2025-09-18-actions-yaml-anchors-and-non-public-workflow-templates/ - https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations#yaml-anchors-and-aliases This uses that to have the same step in two separate job definitions without duplicating the code itself. It would often be preferable do put the job in a composite action, but as noted in previous commit messages (especially in the parenthesized paragraph at the end of 9e4e3ec), this job is best run before `actions/checkout`, yet retrieving the action definition from the current repository at the same ref (in a way that is not excessively complicated or slow) requires that `actions/checkout` have been used first. So this uses a YAML anchor instead.
1 parent d9ea47a commit 38a2189

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ jobs:
254254
runs-on: ${{ matrix.os }}
255255

256256
steps:
257-
- name: Upgrade Git for Windows to latest stable release
257+
- &upgrade_git_for_windows
258+
name: Upgrade Git for Windows to latest stable release
258259
if: startsWith(matrix.os, 'windows')
259260
env:
260261
GH_TOKEN: ${{ github.token }}
@@ -361,6 +362,7 @@ jobs:
361362
runs-on: ${{ matrix.os }}
362363

363364
steps:
365+
- *upgrade_git_for_windows
364366
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
365367
with:
366368
persist-credentials: false

0 commit comments

Comments
 (0)