diff --git a/ci b/ci index 97fc1f9..5a941bf 100755 --- a/ci +++ b/ci @@ -23,9 +23,15 @@ if [ $can_sign != 1 ]; then fi git pull || handle_pull_fail -git checkout -b "${ci_branch}" || handle_co_fail -nix flake update --commit-lock-file || handle_update_fail -nix flake check || handle_check_fail -git checkout main || handle_co_fail -git merge "${ci_branch}" || handle_merge_fail -git push || handle_push_fail + +if [ "${1}" = "update" ]; then + git checkout -b "${ci_branch}" || handle_co_fail + nix flake update --commit-lock-file || handle_update_fail + nix flake check || handle_check_fail + git checkout main || handle_co_fail + git merge "${ci_branch}" || handle_merge_fail + git push || handle_push_fail +else + nix flake check || handle_check_fail +fi + diff --git a/hosts/pwntie/default.nix b/hosts/pwntie/default.nix index 87b384b..51874dd 100644 --- a/hosts/pwntie/default.nix +++ b/hosts/pwntie/default.nix @@ -7,7 +7,7 @@ let ]; jobs = [{ name = "xin-ci"; - script = "cd ~/src/xin && ./ci"; + script = "cd ~/src/xin && ./ci update"; startAt = "daily"; path = [ ]; }];