workflows/ci: Combine the two notify jobs into one

This commit is contained in:
SebastianStork 2026-03-03 17:09:11 +01:00
parent 5ff1cb2851
commit 2cd07d8581
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -105,12 +105,13 @@ jobs:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- name: Push to deploy branch - name: Push to deploy branch
run: git push origin HEAD:deploy --force run: git push origin HEAD:deploy --force
notify-success: notify:
if: always() && needs.deploy.result == 'success' if: always()
needs: [deploy] needs: [deploy]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Send ntfy success notification - name: Notify success
if: needs.deploy.result == 'success'
run: | run: |
curl -s \ curl -s \
-H "Title: CI: Deploy succeeded" \ -H "Title: CI: Deploy succeeded" \
@ -120,12 +121,8 @@ jobs:
-H "Markdown: yes" \ -H "Markdown: yes" \
-d "Commit \`${GITHUB_SHA::7}\` deployed successfully." \ -d "Commit \`${GITHUB_SHA::7}\` deployed successfully." \
https://ntfy.sh/splitleaf https://ntfy.sh/splitleaf
notify-failure: - name: Notify failure
if: always() && needs.deploy.result != 'success' if: needs.deploy.result != 'success'
needs: [deploy]
runs-on: ubuntu-latest
steps:
- name: Send ntfy failure notification
run: | run: |
curl -s \ curl -s \
-H "Title: CI: Deploy failed" \ -H "Title: CI: Deploy failed" \