admin/scripts/notify-from-finland.sh
alisaza a8cd6fc252 ci: build admin on Finland, run on Iran, notify from Finland [skip ci]
Align with ops topology: act_runner/Telegram on Finland, runtime on Iran.
2026-09-13 18:34:21 +03:30

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"