A GitHub Action to send notifications to Telegram about the status of your GitHub Workflow runs. It helps you track processes and get real-time updates on successful or failed executions.
- Send status updates to Telegram (e.g., success, failure, cancelled).
- Customize notifications with a title, message, and footer.
- Include additional workflow details such as actor, repository, and workflow name.
- Automatically generates a commit link button in the notification, making it easier to track specific changes directly from Telegram.
You need:
- A Telegram bot token (you can create a bot using BotFather).
- A chat ID to send messages to.
Name | Required | Description |
---|---|---|
token |
Yes | Telegram Bot Token. Use GitHub Secrets to store this securely. |
chat_id |
Yes | Chat ID where the message will be sent. Use GitHub Secrets to store this securely. |
thread_id |
No | Thread ID for group messages. Optional. |
status |
Yes | Workflow status (e.g., success , failure , cancelled , info ). |
title |
No | Title text for the message. Defaults to a generic status message if not provided. |
message |
No | Custom message text to include in the notification. |
footer |
No | Footer text to include at the end of the notification. |
notify_fields |
No | Comma-separated list of additional fields to include: actor , repository , workflow . These fields enhance the message's informativeness, making it easier for recipients to understand the notification. |
Here’s an example of how to use the action in your GitHub Workflow:
name: CI
on:
push:
branches:
- main
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Run Telegram Notify Action
uses: proDreams/actions-telegram-notifier@v1
if: always()
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
status: ${{ job.status }}
notify_fields: "actor,repository,workflow"
You can customize the notification by including additional inputs like message
and footer
:
- name: Run Telegram Notify Action
uses: proDreams/actions-telegram-notifier@v1
if: always()
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
status: ${{ job.status }}
notify_fields: "actor,repository,workflow"
message: "Custom message text"
footer: "Footer text"
- If the Telegram API request fails, the action will log the error message and the Workflow will fail.
- Common issues include invalid
token
orchat_id
.
- Rust Version: The action uses Rust 1.83, defined in the Dockerfile.
- GitHub Actions Version Compatibility: Compatible with any modern version of GitHub Actions.
- Dockerfile: The action is containerized, ensuring it runs consistently in any environment.
- Ivan "proDream" Ashikhmin