diff --git a/.github/workflows/telegram-test.yaml b/.github/workflows/telegram-test.yaml new file mode 100644 index 0000000..a50d0b5 --- /dev/null +++ b/.github/workflows/telegram-test.yaml @@ -0,0 +1,23 @@ +name: Telegram Notification Test + +on: + workflow_dispatch: + +jobs: + telegram-test: + runs-on: ubuntu-latest + env: + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + steps: + - name: Send Telegram test message + if: ${{ env.TELEGRAM_BOT_TOKEN != '' && env.TELEGRAM_CHAT_ID != '' }} + run: | + curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ + -d chat_id="${TELEGRAM_CHAT_ID}" \ + -d text="[TEST] Telegram notification test +Repository: ${{ github.repository }} +Workflow: ${{ github.workflow }} +Run ID: ${{ github.run_id }} +Triggered by: ${{ github.actor }} +Timestamp: $(date -u '+%Y-%m-%d %H:%M:%S UTC')"