diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9741a5d..75460f6 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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"