feat: add Telegram notifications on CI success/failure
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 48s

This commit is contained in:
Forge
2026-03-06 14:02:25 +08:00
parent b4311f578b
commit 0884f2f18a

View File

@@ -60,3 +60,19 @@ jobs:
echo "✅ Published: https://git.juankibin.space/kibin/-/packages" echo "✅ Published: https://git.juankibin.space/kibin/-/packages"
env: env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} 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"