From f0013b481ead4230e28e4e58cee6b378e470523f Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Tue, 7 Nov 2023 14:08:06 +0000 Subject: [PATCH] Use Dead Man's Snitch to monitor `alert.yml` 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. --- .github/workflows/slack.yml | 2 +- .github/workflows/snitch.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/snitch.yml diff --git a/.github/workflows/slack.yml b/.github/workflows/slack.yml index 49ae1b2..3198a29 100644 --- a/.github/workflows/slack.yml +++ b/.github/workflows/slack.yml @@ -1,7 +1,7 @@ name: Slack on: workflow_run: - workflows: [CI, Alert] + workflows: [CI] types: [completed] branches: [main] jobs: diff --git a/.github/workflows/snitch.yml b/.github/workflows/snitch.yml new file mode 100644 index 0000000..b18b9a3 --- /dev/null +++ b/.github/workflows/snitch.yml @@ -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 }}