actions: Update both stable & unstable flake.lock

This commit is contained in:
traxys 2024-05-26 16:22:04 +02:00
parent 23276f629b
commit 9697385115

View file

@ -1,11 +1,30 @@
name: update-flake-lock name: update-flake-lock
on: on:
workflow_dispatch: # allows manual triggering workflow_dispatch: # allows manual triggering
inputs:
branch:
description: "Branch to update"
type: choice
options:
- 'stable & unstable'
- 'main'
- 'nixos-23.11'
schedule: schedule:
- cron: "0 12 * * SAT" # runs weekly on Saturday at noon - cron: "0 12 * * SAT" # runs weekly on Saturday at noon
jobs: jobs:
lockfile: lockfile:
strategy:
matrix:
# This allows to update both stable & unstable branches, but not both when triggered
# manually
branch: ['main', 'nixos-23.11']
selectedBranch: ["${{ inputs.branch }}"]
exclude:
- selectedBranch: main
branch: 'nixos-23.11'
- selectedBranch: 'nixos-23.11'
branch: main
name: Update the flake inputs and generate options name: Update the flake inputs and generate options
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 40 timeout-minutes: 40
@ -14,6 +33,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
ref: '${{ matrix.branch }}'
- name: Install Nix - name: Install Nix
uses: cachix/install-nix-action@v26 uses: cachix/install-nix-action@v26
@ -25,5 +45,6 @@ jobs:
id: update id: update
uses: DeterminateSystems/update-flake-lock@v21 uses: DeterminateSystems/update-flake-lock@v21
with: with:
pr-title: "Update flake.lock" pr-title: "Update flake.lock (${{ matrix.branch }})"
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
branch: "update_flake_lock_action-${{ matrix.branch }}"