Shared GitHub Actions workflows for release-failure notifications.
- A reusable workflow that sends release-failure alerts with Shoutrrr.
- A Telegram Bot delivery path using a single
SHOUTRRR_URLsecret per caller repository. - A thin caller-workflow template for repositories that need failure notifications.
- A helper script to batch-sync the same
SHOUTRRR_URLsecret across multiple repositories.
.github/workflows/release-failure-telegram.yml— reusable workflow and manual smoke-test entrypoint.templates/workflows/notify-release-failure.yml— thin caller workflow template for other repositories.scripts/sync-shoutrrr-secret.sh— batch sync helper for theSHOUTRRR_URLsecret.docs/specs/— implementation spec and acceptance criteria for this repository.
- Talk to @BotFather and create a dedicated bot.
- Save the bot token.
- Decide whether alerts should go to a private chat or a private group.
Preferred: use Shoutrrr's interactive generator.
docker run --rm -it containrrr/shoutrrr generate telegramAlternative: forward a message to @shoutrrrbot, or add @shoutrrrbot to the target group and mention it once so it can return the chat ID.
Format the service URL like this:
telegram://<BOT_TOKEN>@telegram?chats=<CHAT_ID>
Optional Telegram parameters can be appended to the URL, for example:
telegram://<BOT_TOKEN>@telegram?chats=<CHAT_ID>&preview=false
In this repository's GitHub settings:
- Open
Settings -> Actions -> General. - Find the
Accesssection. - Choose
Accessible from repositories owned by '<YOUR_USERNAME>' user.
You can sync the same secret into multiple repositories with the helper script:
export SHOUTRRR_URL='telegram://<BOT_TOKEN>@telegram?chats=<CHAT_ID>'
./scripts/sync-shoutrrr-secret.sh --repo repo-a --repo repo-bTo target every non-archived repository for the authenticated user:
export SHOUTRRR_URL='telegram://<BOT_TOKEN>@telegram?chats=<CHAT_ID>'
./scripts/sync-shoutrrr-secret.sh --allCopy templates/workflows/notify-release-failure.yml into the caller repository at:
.github/workflows/notify-release-failure.yml
Then customize:
YOUR_USERNAMEto your GitHub username.- the watched workflow names under
on.workflow_run.workflows. - the
ref_labelexpression if your release workflow is tag-driven and you want a custom label. - keep the built-in
workflow_dispatchentrypoint so each caller repository can run a safe notifier smoke test after setup or secret rotation.
- It is triggered through
workflow_callfrom a caller repository. - It also supports
workflow_dispatchfor a manual smoke test in this repository. - The caller passes workflow metadata and the
SHOUTRRR_URLsecret. - The reusable workflow formats a Telegram-friendly message whose first line is an emoji-prefixed status plus repository name, then sends it with
containrrr/shoutrrr-action@v1. - The thin caller template also supports
workflow_dispatch, which sends a smoke-test message without waiting for a real release failure.
- Use a dedicated Telegram bot for CI alerts.
- Keep the full Shoutrrr URL only in
SHOUTRRR_URLsecrets. - The notifier workflow should never check out or execute untrusted code, because
workflow_runtriggered workflows can access secrets and write-capable tokens. - For private-chat delivery, the destination user must start the bot first. For group delivery, add the bot to the group before testing.
After pushing this repository to GitHub and setting the SHOUTRRR_URL secret here, open the Release failure Telegram notifier workflow and use Run workflow.
Suggested test inputs:
repository:your-user/example-repoworkflow_name:Releaseconclusion:failurerun_url: a real or placeholder GitHub Actions URLref_label:tag: v0.1.0
- Each caller repository still needs one local
workflow_runnotifier file. GitHub does not support subscribing to other repositories' workflow events globally. - The
workflow_runnotifier file must exist on the caller repository's default branch. - This repository can be shared directly with your own private repositories. Public repositories may need a different sharing strategy if you want to keep this repository private.