17 lines
603 B
Bash
Executable File
17 lines
603 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Notify ops Telegram from the Finland Actions runner (not from Iran).
|
|
# Credentials come from Gitea Actions secrets — same model as telegrambot.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
: "${TELEGRAM_BOT_TOKEN:?TELEGRAM_BOT_TOKEN secret required}"
|
|
|
|
if [[ -z "${TELEGRAM_GROUP_CHAT_ID:-}${TELEGRAM_CHAT_ID:-}" ]]; then
|
|
echo "[ghabilee-admin-notify] failed: set TELEGRAM_GROUP_CHAT_ID or TELEGRAM_CHAT_ID" >&2
|
|
exit 1
|
|
fi
|
|
|
|
chmod +x "${SCRIPT_DIR}/notify-ops-telegram.sh" "${SCRIPT_DIR}/notify-deploy.sh"
|
|
bash "${SCRIPT_DIR}/notify-deploy.sh"
|