workflows/ci: Add success/failure ntfy notifications

This commit is contained in:
SebastianStork 2026-03-03 16:49:28 +01:00
parent 36f24bdd30
commit 7607620fbb
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -105,3 +105,31 @@ jobs:
- uses: actions/checkout@v5
- name: Push to deploy branch
run: git push origin HEAD:deploy --force
notify-success:
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs: [build-package, build-check, build-server, build-workstation, deploy]
runs-on: ubuntu-latest
steps:
- name: Send ntfy success notification
run: |
curl -s \
-H "Title: CI succeeded" \
-H "Priority: low" \
-H "Tags: white_check_mark" \
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
-d "Commit ${{ github.sha }} succeeded." \
https://ntfy.sh/splitleaf
notify-failure:
if: always() && contains(needs.*.result, 'failure')
needs: [build-package, build-check, build-server, build-workstation, deploy]
runs-on: ubuntu-latest
steps:
- name: Send ntfy failure notification
run: |
curl -s \
-H "Title: CI failed" \
-H "Priority: default" \
-H "Tags: rotating_light" \
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
-d "Commit ${{ github.sha }} failed." \
https://ntfy.sh/splitleaf