Commit 1a780f49cff6
Changed files (1)
systems
kerkouane
systems/kerkouane/extra.nix
@@ -173,17 +173,8 @@ in
JOB_TYPE=$(echo "$UNIT_NAME" | cut -d'-' -f2)
REPO=$(echo "$UNIT_NAME" | cut -d'-' -f3)
- if [ "$RESULT" = "success" ]; then
- ${pkgs.curl}/bin/curl -s \
- -H "Authorization: Bearer $(${pkgs.coreutils}/bin/tr -d '\n' < ${
- config.age.secrets."ntfy-token".path
- })" \
- -H "Title: ✅ Git $JOB_TYPE Success: $REPO ($DURATION_STR)" \
- -H "Tags: white_check_mark,git,$JOB_TYPE" \
- -H "Priority: default" \
- -d "Job $UNIT_NAME completed successfully in $DURATION_STR (exit code: $EXIT_CODE)" \
- "https://ntfy.sbr.pm/git-builds" || true
- else
+ # Only notify on failure
+ if [ "$RESULT" != "success" ]; then
${pkgs.curl}/bin/curl -s \
-H "Authorization: Bearer $(${pkgs.coreutils}/bin/tr -d '\n' < ${
config.age.secrets."ntfy-token".path