Files
gitea-manual-approval/notify
T
2025-11-24 18:56:11 -05:00

18 lines
376 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
msg="$1"
# Apprise CLI
if command -v apprise >/dev/null 2>&1; then
apprise -b "$msg" >/dev/null 2>&1 || true
fi
# Apprise API
if [[ -n "${APPRISE_API_URL:-}" ]]; then
curl -s -X POST \
-H "Content-Type: application/json" \
-d "{\"body\":\"$msg\"}" \
"$APPRISE_API_URL/notify" >/dev/null 2>&1 || true
fi