T: Add telegram reporting

This commit is contained in:
Ivan 2025-03-20 15:56:18 +03:00
parent e4d38b1093
commit 4956fbe1ba
2 changed files with 26 additions and 0 deletions

View File

@ -40,3 +40,16 @@ jobs:
run: | run: |
python manage.py check python manage.py check
python manage.py test python manage.py test
notify-failure:
runs-on: ubuntu-latest
needs: build
if: failure()
defaults:
run:
working-directory: .
steps:
- name: Send Telegram Notification
run: |
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
-d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} \
-d text="❌ Backend build failed! Repository: ${{ github.repository }} Commit: ${{ github.sha }}"

View File

@ -49,3 +49,16 @@ jobs:
name: playwright-report name: playwright-report
path: playwright-report/ path: playwright-report/
retention-days: 30 retention-days: 30
notify-failure:
runs-on: ubuntu-latest
needs: build
if: failure()
defaults:
run:
working-directory: .
steps:
- name: Send Telegram Notification
run: |
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
-d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} \
-d text="❌ Front build failed! Repository: ${{ github.repository }} Commit: ${{ github.sha }}"