nix-community.nixvim/.github/workflows/update-other.yml
2025-06-12 20:57:50 +00:00

44 lines
1.1 KiB
YAML

name: Schedule update for other branches
on:
# Runs every Saturday at noon
schedule:
- cron: "0 12 * * SAT"
# Allow running workflows
permissions:
contents: read
actions: write
jobs:
prepare:
name: Compute list of branches
runs-on: ubuntu-24.04-arm
if: github.repository == 'nix-community/nixvim'
outputs:
branches: ${{ steps.list-branches.outputs.branches }}
steps:
- name: List stable branches
id: list-branches
run: |
echo 'branches<<EOF
[
"nixos-25.05",
"nixos-24.11"
]
EOF' >> "$GITHUB_OUTPUT"
update:
name: Trigger update on ${{ matrix.branch }}
runs-on: ubuntu-24.04-arm
needs: prepare
strategy:
matrix:
branch: ${{ fromJSON(needs.prepare.outputs.branches) }}
steps:
- name: workflow dispatch
env:
GH_TOKEN: ${{ github.token }}
repo: ${{ github.repository }}
branch: ${{ matrix.branch }}
run: |
gh --repo "$repo" workflow run \
update.yml --ref "$branch"