ci/update: make steps optional

Allow toggling off the flake.lock or generate files steps.
This commit is contained in:
Matt Sturgeon 2024-08-03 18:35:26 +01:00
parent d3cb750e6a
commit 83a8109ec4
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -6,6 +6,14 @@ on:
# Allow manual triggering # Allow manual triggering
workflow_dispatch: workflow_dispatch:
inputs: inputs:
lock:
type: boolean
default: true
description: Update flake.lock
generate:
type: boolean
default: true
description: Update generated files
nixos-24.05: nixos-24.05:
type: boolean type: boolean
description: Also update nixos-24.05 description: Also update nixos-24.05
@ -54,6 +62,7 @@ jobs:
- name: Update flake.lock - name: Update flake.lock
id: flake_lock id: flake_lock
if: inputs.lock || github.event_name == 'schedule'
run: | run: |
old=$(git show --no-patch --format=%h) old=$(git show --no-patch --format=%h)
nix flake update --commit-lock-file nix flake update --commit-lock-file
@ -66,6 +75,7 @@ jobs:
- name: Update generated files - name: Update generated files
id: generate id: generate
if: inputs.generate || github.event_name == 'schedule'
run: | run: |
old=$(git show --no-patch --format=%h) old=$(git show --no-patch --format=%h)
nix-build ./update-scripts -A generate nix-build ./update-scripts -A generate