mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 15:29:07 +01:00
workflows/ci: Add success/failure ntfy notifications
This commit is contained in:
parent
36f24bdd30
commit
7607620fbb
1 changed files with 28 additions and 0 deletions
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue