mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
ci/update-other: generate branch list from version-info
Uses a sparse-checkout to download only the `version-info.toml` file, then uses the `yq-go` action to extract the "other" branches as a JSON array.
This commit is contained in:
parent
7e02029af6
commit
d9a4a56dcf
1 changed files with 12 additions and 8 deletions
20
.github/workflows/update-other.yml
vendored
20
.github/workflows/update-other.yml
vendored
|
@ -15,17 +15,21 @@ jobs:
|
|||
runs-on: ubuntu-24.04-arm
|
||||
if: github.repository == 'nix-community/nixvim'
|
||||
outputs:
|
||||
branches: ${{ steps.list-branches.outputs.branches }}
|
||||
branches: ${{ steps.list-branches.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout version-info
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: version-info.toml
|
||||
sparse-checkout-cone-mode: false
|
||||
- name: List stable branches
|
||||
id: list-branches
|
||||
run: |
|
||||
echo 'branches<<EOF
|
||||
[
|
||||
"nixos-25.05",
|
||||
"nixos-24.11"
|
||||
]
|
||||
EOF' >> "$GITHUB_OUTPUT"
|
||||
uses: mikefarah/yq@master
|
||||
with:
|
||||
cmd: |
|
||||
yq --no-colors --output-format=json \
|
||||
'[ .versions[].branch | select(. != "main") ]' \
|
||||
version-info.toml
|
||||
update:
|
||||
name: Trigger update on ${{ matrix.branch }}
|
||||
runs-on: ubuntu-24.04-arm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue