ci: call ci from ci

This commit is contained in:
Aaron Bieber 2023-01-29 08:52:54 -07:00
parent 7db02cd705
commit 8094529d53
No known key found for this signature in database

28
ci
View File

@ -13,22 +13,24 @@ else
tmux -2 new-session -d ${SESS}
fi
tmux -2 attach-session -t "$NAME"
tmux -2 attach-session -t "$NAME" "./ci run"
trap ci_error INT TERM
ci_branch=$(date +"%Y%m%dT%H%M%S%z")
can_sign=0
if [ "$1" = "run" ]; then
ci_branch=$(date +"%Y%m%dT%H%M%S%z")
can_sign=0
for i in $(ssh-add -L | awk '{print $NF}'); do
grep -q $i .allowed_signers && can_sign=1
done
for i in $(ssh-add -L | awk '{print $NF}'); do
grep -q $i .allowed_signers && can_sign=1
done
if [ $can_sign != 1 ]; then
echo "Can't find signing key."
exit 1
if [ $can_sign != 1 ]; then
echo "Can't find signing key."
exit 1
fi
git checkout -b "${ci_branch}" || handle_co_fail
nix flake update --commit-lock-file || handle_update_fail
nix flake check || handle_check_fail
fi
git checkout -b "${ci_branch}" || handle_co_fail
nix flake update --commit-lock-file || handle_update_fail
nix flake check || handle_check_fail