mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 15:29:07 +01:00
workflows/ci: Notify directly after the deploy job
This commit is contained in:
parent
c910f76c02
commit
5ff1cb2851
1 changed files with 8 additions and 8 deletions
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
|
@ -106,32 +106,32 @@ jobs:
|
||||||
- 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-success:
|
||||||
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
|
if: always() && needs.deploy.result == 'success'
|
||||||
needs: [build-package, build-check, build-server, build-workstation, deploy]
|
needs: [deploy]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Send ntfy success notification
|
- name: Send ntfy success notification
|
||||||
run: |
|
run: |
|
||||||
curl -s \
|
curl -s \
|
||||||
-H "Title: CI succeeded" \
|
-H "Title: CI: Deploy succeeded" \
|
||||||
-H "Priority: low" \
|
-H "Priority: low" \
|
||||||
-H "Tags: white_check_mark" \
|
-H "Tags: white_check_mark" \
|
||||||
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
-H "Markdown: yes" \
|
-H "Markdown: yes" \
|
||||||
-d "Commit `${{ github.sha }}` succeeded." \
|
-d "Commit \`${GITHUB_SHA::7}\` deployed successfully." \
|
||||||
https://ntfy.sh/splitleaf
|
https://ntfy.sh/splitleaf
|
||||||
notify-failure:
|
notify-failure:
|
||||||
if: always() && contains(needs.*.result, 'failure')
|
if: always() && needs.deploy.result != 'success'
|
||||||
needs: [build-package, build-check, build-server, build-workstation, deploy]
|
needs: [deploy]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Send ntfy failure notification
|
- name: Send ntfy failure notification
|
||||||
run: |
|
run: |
|
||||||
curl -s \
|
curl -s \
|
||||||
-H "Title: CI failed" \
|
-H "Title: CI: Deploy failed" \
|
||||||
-H "Priority: default" \
|
-H "Priority: default" \
|
||||||
-H "Tags: rotating_light" \
|
-H "Tags: rotating_light" \
|
||||||
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
-H "Markdown: yes" \
|
-H "Markdown: yes" \
|
||||||
-d "Commit `${{ github.sha }}` failed." \
|
-d "Commit \`${GITHUB_SHA::7}\` failed to deploy." \
|
||||||
https://ntfy.sh/splitleaf
|
https://ntfy.sh/splitleaf
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue