Testing for Telegram Monitor bot #9
This file contains hidden or 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: Telegram notify on push | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| notify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Send message to Telegram | |
| run: | | |
| curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_MONITOR_TOKEN }}/sendMessage" \ | |
| -d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \ | |
| -d parse_mode="HTML" \ | |
| -d text="<b>User:</b> ${{ github.actor }} committed the repository <code>${{ github.repository }}</code> | |
| <b>Time:</b> $(date +'%Y-%m-%d %H:%M:%S') | |
| <b>Commit header:</b> ${{ github.event.head_commit.message }} | |
| <a href='${{ github.event.head_commit.url }}'>View Commit Details</a>" |