update-flake-lock/update-flake-lock.sh
a-kenji a10510d383 Add: script for update flake lock
Take commands out of the `action.yml` file, and put it in a dedicated
shell script.
2022-04-05 08:50:00 -07:00

12 lines
346 B
Bash
Executable file

#!/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