mirror of
https://github.com/DeterminateSystems/update-flake-lock.git
synced 2025-07-03 03:43:49 +03:00
Use gh CLI to make (verified) commit
This commit is contained in:
parent
0ad9a55048
commit
6f9fc6eab1
2 changed files with 41 additions and 2 deletions
|
@ -5,12 +5,18 @@ if [[ -n "$PATH_TO_FLAKE_DIR" ]]; then
|
|||
cd "$PATH_TO_FLAKE_DIR"
|
||||
fi
|
||||
|
||||
commitArg=""
|
||||
|
||||
if [[ "$COMMIT_WITH_TOKEN" != true ]]; then
|
||||
commitArg="--commit-lock-file "
|
||||
fi
|
||||
|
||||
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"
|
||||
nix flake lock "${inputs[@]}" $commitArg --commit-lockfile-summary "$COMMIT_MSG"
|
||||
else
|
||||
nix flake update --commit-lock-file --commit-lockfile-summary "$COMMIT_MSG"
|
||||
nix flake update $commitArg --commit-lockfile-summary "$COMMIT_MSG"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue