update-flake-lock: allow updating specific inputs

This commit is contained in:
Harsh Shandilya 2024-04-23 00:35:24 +05:30
parent da734d3bee
commit c500cec457
1 changed files with 9 additions and 1 deletions

View File

@ -2,6 +2,12 @@ name: Update flake.lock
on:
workflow_call:
inputs:
inputs:
description: Space separated list of flake inputs to be updated (defaults to all)
type: string
default: ""
required: false
secrets:
github-token:
required: true
@ -21,8 +27,10 @@ jobs:
- name: Update flake.lock and push
shell: bash
env:
INPUTS: ${{ inputs.inputs }}
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "noreply@github.com"
nix flake update --commit-lock-file
nix flake update ${INPUTS} --commit-lock-file
git push