Initial Gitea Runner Debian builder

This commit is contained in:
2026-05-08 18:36:54 +02:00
commit c6ab070c09
13 changed files with 299 additions and 0 deletions
Executable
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
CONFIG_FILE="/home/users/tracer/gitea-runner-deb-builder/build.conf"
source "$CONFIG_FILE"
OUTPUT=$(/bin/bash /home/users/tracer/gitea-runner-deb-builder/build.sh 2>&1)
EXIT_CODE=$?
if [[ "$notify" == "never" ]]; then
exit $EXIT_CODE
fi
if [[ "$notify" == "error" && $EXIT_CODE -ne 0 ]]; then
SUBJECT="[Gitea Runner Build] Failed"
echo "$OUTPUT" | mail -s "$SUBJECT" "$email"
exit $EXIT_CODE
fi
if echo "$OUTPUT" | grep -q '^SKIP:'; then
if [[ "$notify" == "error" || "$notify" == "success" ]]; then
exit 0
fi
fi
if [[ "$notify" == "success" && $EXIT_CODE -eq 0 ]]; then
SUBJECT="[Gitea Runner Build] Success"
echo "$OUTPUT" | mail -s "$SUBJECT" "$email"
exit 0
fi
SUBJECT="[Gitea Runner Build] Run result: $( [[ $EXIT_CODE -eq 0 ]] && echo Success || echo Failure )"
echo "$OUTPUT" | mail -s "$SUBJECT" "$email"
exit $EXIT_CODE