Skip to content

Commit

Permalink
Use Dead Man's Snitch to monitor alert.yml
Browse files Browse the repository at this point in the history
Use Dead Man's Snitch (the new `snitch.yml` workflow that this commit
adds) to monitor the `alert.yml` workflow and make sure it's completing
successfully, instead of having the `slack.yml` workflow post into Slack
when `alert.yml` fails.

This is better because it will alerts us if `alert.yml` is no longer
running, not only if it's running but failing.

Dead Man's Snitch will post the alerts into Slack for us.
  • Loading branch information
seanh committed Nov 7, 2023
1 parent 8c6edec commit f0013b4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/slack.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Slack
on:
workflow_run:
workflows: [CI, Alert]
workflows: [CI]
types: [completed]
branches: [main]
jobs:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/snitch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Dead Man's Snitch
on:
workflow_run:
workflows: [Alert]
types: [completed]
branches: [main]
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Check in with Dead Man's Snitch
run: curl https://nosnch.in/${{ secrets.SNITCH_ID }}

0 comments on commit f0013b4

Please sign in to comment.