mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +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
|
runs-on: ubuntu-24.04-arm
|
||||||
if: github.repository == 'nix-community/nixvim'
|
if: github.repository == 'nix-community/nixvim'
|
||||||
outputs:
|
outputs:
|
||||||
branches: ${{ steps.list-branches.outputs.branches }}
|
branches: ${{ steps.list-branches.outputs.result }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout version-info
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
sparse-checkout: version-info.toml
|
||||||
|
sparse-checkout-cone-mode: false
|
||||||
- name: List stable branches
|
- name: List stable branches
|
||||||
id: list-branches
|
id: list-branches
|
||||||
run: |
|
uses: mikefarah/yq@master
|
||||||
echo 'branches<<EOF
|
with:
|
||||||
[
|
cmd: |
|
||||||
"nixos-25.05",
|
yq --no-colors --output-format=json \
|
||||||
"nixos-24.11"
|
'[ .versions[].branch | select(. != "main") ]' \
|
||||||
]
|
version-info.toml
|
||||||
EOF' >> "$GITHUB_OUTPUT"
|
|
||||||
update:
|
update:
|
||||||
name: Trigger update on ${{ matrix.branch }}
|
name: Trigger update on ${{ matrix.branch }}
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue