Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# notify.sh <tag> <status> — send Telegram deploy notification
|
||||
set -euo pipefail
|
||||
|
||||
TAG="$1"
|
||||
STATUS="$2"
|
||||
|
||||
if [ "$STATUS" = "success" ]; then
|
||||
ICON="✅"
|
||||
LABEL="部署成功"
|
||||
else
|
||||
ICON="❌"
|
||||
LABEL="部署失败"
|
||||
fi
|
||||
|
||||
MSG="${ICON} 岩美 ${TAG} ${LABEL}
|
||||
https://jiu.51yanmei.com"
|
||||
|
||||
curl -sf -X POST "https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage" \
|
||||
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
||||
--data-urlencode "text=${MSG}" \
|
||||
> /dev/null
|
||||
|
||||
echo "==> notify: sent to Telegram (${STATUS})"
|
||||
Reference in New Issue
Block a user