Guide · CI/CD
Monitor GitHub Actions
A scheduled workflow that stops firing looks exactly like a quiet Tuesday: GitHub Actions gives no error, no notification, nothing in the Actions tab worth noticing. A check-in from the workflow turns that silence into an alert.
1. Create a check
In Mortemain, create a check matching your workflow's cron schedule, with a grace window that covers GitHub's runner queue (scheduled workflows can start several minutes late when the platform is busy, and GitHub disables the schedule entirely on repositories with no activity for 60 days). Copy the check's ping URL.
2. Ping on success
Add a final step that runs only if every previous step passed, and hits the ping URL:
name: Nightly sync on: schedule: - cron: '0 3 * * *' workflow_dispatch: jobs: sync: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Run sync run: ./scripts/sync.sh - name: Ping Mortemain (success) if: success() run: curl -fsS -m 10 https://ping.mortemain.com/your-check-uuid
Workflow files in public repositories are visible to anyone. If that's a concern, store the URL as a repository secret instead of hardcoding it, then reference ${{ secrets.MORTEMAIN_PING_URL }} in the run: line.
3. Alert immediately on a failed run
Add a second step guarded by if: failure(), hitting the same URL with /fail on the end. This tells Mortemain the run happened but errored, so it alerts right away instead of waiting for the check's window to lapse:
- name: Ping Mortemain (failure) if: failure() run: curl -fsS -m 10 https://ping.mortemain.com/your-check-uuid/fail
4. Time the run with a start ping (optional)
Add a step before the real work that hits /start. Mortemain then measures each run's duration and can flag one that's taking far longer than usual, useful for catching a job stuck waiting on a hung dependency:
- name: Ping Mortemain (start) run: curl -fsS -m 10 https://ping.mortemain.com/your-check-uuid/start - name: Run sync run: ./scripts/sync.sh
Test it
Trigger the workflow by hand from the Actions tab (workflow_dispatch) and watch the check flip to up. Then break a step on purpose, an exit code 1 is enough, and confirm the failure alert lands immediately rather than after the grace window expires.