AlertKite
← AlertKite

Alert on WhatsApp when a GitHub Actions workflow stops running

GitHub disables scheduled workflows in repositories with no activity for 60 days. It emails the repository owner once, and that email is very easy to miss.

Scheduled runs are also delayed or dropped entirely under load — the schedule is best-effort, not a guarantee. If a workflow does something that matters, something outside GitHub should be watching that it actually ran.

Add as the last step of your workflow

      - name: Report success
        if: success()
        run: curl -fsS -m 10 https://hb.alertkite.com/p/${{ secrets.ALERTKITE_TOKEN }}

      - name: Report failure
        if: failure()
        run: curl -fsS -m 10 https://hb.alertkite.com/p/${{ secrets.ALERTKITE_TOKEN }}/fail

Setting it up

  1. Create a heartbeat monitor and copy the token from its ping URL.
  2. Add it as a repository secret named ALERTKITE_TOKEN.
  3. Add both steps above to the end of your workflow.
  4. Set the expected period a little longer than your schedule, since scheduled runs are often delayed.

Give it generous slack

GitHub's scheduled runs are routinely late by several minutes, and sometimes much more at the top of the hour when everyone's cron fires at once. A grace period shorter than that will page you about GitHub's queue rather than your workflow.

if: success() is doing real work

Without it, the step runs even when earlier steps failed, and a broken workflow reports itself healthy every time.