feat: fatal on exit
All checks were successful
push / build (push) Successful in 1m4s

This commit is contained in:
张泊明518370910136 2025-09-14 18:09:56 -07:00
parent cfa718dfaf
commit ae0086e5fd
GPG Key ID: CA088E6D9284F870

View File

@ -18,6 +18,7 @@ main() {
repo_name=$(basename "$(pwd)") repo_name=$(basename "$(pwd)")
course=${repo_name%-*} course=${repo_name%-*}
if ! [[ "$course" =~ ^[a-zA-Z0-9_-]+$ ]]; then if ! [[ "$course" =~ ^[a-zA-Z0-9_-]+$ ]]; then
echo "FATAL: Invalid course name: $course"
exit 1 exit 1
fi fi
@ -67,6 +68,9 @@ EOF
GITEA_ORG_NAME=$org_name GITEA_ORG_NAME=$org_name
GITEA_ACCESS_TOKEN=$TEAPOT_GITEA_TOKEN GITEA_ACCESS_TOKEN=$TEAPOT_GITEA_TOKEN
EOF EOF
else
echo "FATAL: TEAPOT_GITEA_TOKEN not set"
exit 1
fi fi
} }