update: git2tg.yml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" | |
}' |