mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 15:29:07 +01:00
workflows/ci: Combine the two notify jobs into one
This commit is contained in:
parent
5ff1cb2851
commit
2cd07d8581
1 changed files with 6 additions and 9 deletions
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
|
|
@ -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" \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue