Skip to content

update: git2tg.yml

update: git2tg.yml #5

Workflow file for this run

name: Send Git Updates to Telegram Chat
on:
[push, pull_request, issues]
jobs:
send_updates:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
repository: PayTechUz/payme-pkg
- name: Get commit messages
id: commit_messages
run: |
git log --format="%h %s" -n 5
- name: Send updates to Telegram
run: |
curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
--header 'Content-Type: application/json' \
--data-raw '{
"chat_id": ${{ secrets.TELEGRAM_CHAT_ID }},
"message_thread_id": ${{ secrets.TELEGRAM_CHAT_TOPIC }},
"text": "${{ steps.commit_messages.outputs.stdout }}"
}'