feat: add Telegram notifications on CI success/failure
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 48s
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 48s
This commit is contained in:
@@ -60,3 +60,19 @@ jobs:
|
||||
echo "✅ Published: https://git.juankibin.space/kibin/-/packages"
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
|
||||
|
||||
- name: Notify Success
|
||||
if: success()
|
||||
run: |
|
||||
SHA=$(echo "${{ gitea.sha }}" | cut -c1-7)
|
||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||
-d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||
-d "text=✅ LexAI CI Passed%0A%0ABranch: ${{ gitea.ref_name }}%0ACommit: ${SHA}%0A%0AAll steps green — new build published to packages."
|
||||
|
||||
- name: Notify Failure
|
||||
if: failure()
|
||||
run: |
|
||||
SHA=$(echo "${{ gitea.sha }}" | cut -c1-7)
|
||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||
-d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||
-d "text=❌ LexAI CI FAILED%0A%0ABranch: ${{ gitea.ref_name }}%0ACommit: ${SHA}%0A%0ACheck: https://git.juankibin.space/kibin/LexAI/actions"
|
||||
|
||||
Reference in New Issue
Block a user