Skip to content
message-circle

GitHub Action

Send telegram notification

v1.1.0 Latest version

Send telegram notification

message-circle

Send telegram notification

Send notification about your GitHub actions job status via telegram

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Send telegram notification

uses: haishanh/actions-telegram-notification@v1.1.0

Learn more about this action in haishanh/actions-telegram-notification

Choose a version

actions-telegram-notification

build-test

This action send a notification about your action runs.

Telegram Notification Screenshots

Usage

See action.yml

Basic:

- uses: haishanh/actions-telegram-notification@v1
  if: ${{ always() }}
  with:
    notification-token: ${{ secrets.NOTIFICATION_TOKEN }}
    job-status: ${{ job.status }}

You can obtain a NOTIFICATION_TOKEN by sending the command /token to the GitHub Actions Notification bot. After you get the token, goto your repo "Settings" page, select "Secrets" and add it as a secret environment variables there.

Note that GitHub Actions Notification bot is not a GitHub official one, the source code of the bot API is here. And it's running on vercel.

Development

# install deps
yarn

Smoke Test

create a .env file with content like below:

JWT="The NOTIFICATION_TOKEN you grab from the bot"
# if you want to use your own bot
BOT_TOKEN="your BOT_TOKEN"
CHAT_ID="your chat id"
yarn do ./src/local.ts