TelegramCommitNotifier is a GitHub Action that tracks commits in your repositories and sends notifications to Telegram.
- Open Telegram and find the bot @BotFather.
- Send the command /newbot and follow the instructions to create a new bot.
- After creating the bot, you will receive a token that will be used to send messages.
-
Create a new channel in Telegram.
-
Add your bot to the channel as an administrator.
-
To get the channel ID, send any message in the channel, then use the following URL in your browser: https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
Replace <YOUR_BOT_TOKEN> with your token. Find your channel ID in the response.
- Go to your repository on GitHub.
- Click on Settings > Secrets and variables > Actions.
- Click on New repository secret.
- Create two secrets:
- TELEGRAM_BOT_TOKEN — your bot token.
- TELEGRAM_CHANNEL_ID — your channel ID.
Create a directory .github/workflows and insert Telegram Notifications.yml file.
- Every time you push to the main branch, this action will trigger.
- It will send a message with information about the new commit to the specified Telegram channel.
Now you're all set to receive notifications about new commits directly in your Telegram channel!