GitHub Action for sending a Telegram notification message.
This action send a message via Telegram when there is a push/release.
Send a default message on push/release event:
name: Notify
on:
push:
release:
types: [published]
jobs:
notify:
name: Notify via Telegram
runs-on: ubuntu-latest
steps:
- name: Send message to Telegram
uses: Lukasss93/telegram-action@v2
env:
TELEGRAM_TOKEN: ${{ secrets.telegram_token }}
TELEGRAM_CHAT: ${{ secrets.telegram_chat }}
- TELEGRAM_TOKEN
string
- Telegram authorization token - TELEGRAM_CHAT
string
- Unique identifier chat
How to get a telegram token: BotFather
How to get a telegram chat identifier:
- Forward a message from the target chat to @JsonDumpBot
- Copy the message β‘ forward_from_chat β‘ id
Input | Optional? | Expected value | Description |
---|---|---|---|
commit_template | Yes | File path | Override the default commit template message |
release_template | Yes | File path | Override the default commit template message |
status | Yes | ${{job.status}} |
Job status |
// ./templates/commit.mustache
{{#commits}}
<a href="{{{repo_url}}}">{{repo_name}}</a> β’ <a href="https://github.com/{{actor}}">{{actor}}</a> β’ <a href="{{commit_url}}">{{commit_sha}}</a>
{{commit_message}}
{{/commits}}
{{status}}
// ./templates/release.mustache
<a href="{{{tag_url}}}">New {{repo_name}} release</a>: <code>{{tag_name}}</code> ({{tag_type}})
{{{body}}}
Check this workflow: test.yml
Please see the CHANGELOG.md for more information on what has changed recently.
Please see the LICENSE.md file for more information.