Testing for Telegram Monitor bot #7
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 | ||
| - 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>" | ||