Add: script for update flake lock

Take commands out of the `action.yml` file, and put it in a dedicated
shell script.
This commit is contained in:
a-kenji
2022-04-03 18:26:19 +02:00
committed by Cole Helbling
parent e00d99112b
commit a10510d383
2 changed files with 15 additions and 10 deletions

12
update-flake-lock.sh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ -n "$TARGETS" ]]; then
inputs=()
for input in $TARGETS; do
inputs+=("--update-input" "$input")
done
nix flake lock "${inputs[@]}" --commit-lock-file --commit-lockfile-summary "$COMMIT_MSG"
else
nix flake update --commit-lock-file --commit-lockfile-summary "$COMMIT_MSG"
fi