Skip to content

Commit 1f67794

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 caecf2b commit 1f67794

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/ci.yml

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

274274
steps:
275-
- name: Upgrade Git for Windows to latest stable release
275+
- &upgrade_git_for_windows
276+
name: Upgrade Git for Windows to latest stable release
276277
if: startsWith(matrix.os, 'windows')
277278
env:
278279
GH_TOKEN: ${{ github.token }}
@@ -379,6 +380,7 @@ jobs:
379380
runs-on: ${{ matrix.os }}
380381

381382
steps:
383+
- *upgrade_git_for_windows
382384
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
383385
with:
384386
persist-credentials: false

0 commit comments

Comments
 (0)