ci: only run 'flake check' when we have a new commit

This commit is contained in:
Aaron Bieber 2023-07-17 06:22:16 -06:00
parent 1fbee1909c
commit b48a486932
No known key found for this signature in database

14
bin/ci
View File

@ -49,14 +49,22 @@ if [ "${1}" = "update" ]; then
continue
fi
current_hash="$(git rev-parse HEAD)"
if ! nix flake lock --commit-lock-file --update-input "$inp"; then
handle_update_fail "$inp"
continue
fi
if ! nix flake check --print-build-logs; then
handle_update_check_fail "$inp"
continue
maybe_new_hash="$(git rev-parse HEAD)"
if [ "${current_hash}" != "${maybe_new_hash}" ]; then
if ! nix flake check --print-build-logs; then
handle_update_check_fail "$inp"
continue
fi
else
msg "No change in input, skipping checks."
fi
if ! git checkout "${ci_branch}"; then