Update README.md #134
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 Commit Notification | |
| on: [push] | |
| jobs: | |
| notify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Send Telegram notification | |
| env: | |
| BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
| CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
| run: | | |
| MESSAGE="🚀 A new commit was pushed to: ${{ github.ref_name }} | |
| 📂 Repository: <b>${{ github.repository }}</b> | |
| ✉️ Commit Message: <i>${{ github.event.head_commit.message }}</i> | |
| 👤 Author: <code>${{ github.event.head_commit.author.name }}</code> | |
| 🔑 Commit SHA: <code>${{ github.sha }}</code> | |
| 🔍 Compare Changes: <a href='${{ github.event.compare }}'>View Changes</a> | |
| ⏰ Timestamp: ${{ github.event.head_commit.timestamp }} | |
| 🌟 Happy coding! | |
| 🔄 Triggered automatically by GitHub Actions" | |
| curl -s -X POST \ | |
| "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \ | |
| -d "chat_id=${CHAT_ID}" \ | |
| -d "text=${MESSAGE}" \ | |
| -d "parse_mode=HTML" \ | |
| -d "disable_web_page_preview=true" |