Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1maker committed Aug 12, 2024
1 parent 683cfa4 commit 87a158a
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions .github/workflows/Telegram Notifications.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
name: Telegram Notifications
name: Telegram Notifications

on:
push:
branches:
- main
on:
push:
branches:
- main

jobs:
send-telegram-notification:
runs-on: ubuntu-latest
jobs:
send-telegram-notification:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Dependencies
run: pip install python-telegram-bot
- name: Install Dependencies
run: pip install python-telegram-bot

- name: Send Telegram Notification
run: |
- name: Send Telegram Notification
run: |
python -c "import telegram; bot = telegram.Bot(token='BTID'); chat_id = 'NGTID'; bot.send_message(chat_id=chat_id, text='New commit! [commit link]')"
env:
BTID: ${{ secrets.TELEGRAM_BOT_TOKEN }}
NGTID: ${{ secrets.TELEGRAM_CHANNEL_ID }}
commit_link: ${{ github.event.commits[0].url }}
- name: Delete sensitive data
run: |
rm -f ./secrets.txt
env:
secrets.TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
secrets.TELEGRAM_CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}



0 comments on commit 87a158a

Please sign in to comment.