Menu

A free uptime check with GitHub Actions that opens (and closes) an issue for you
📰

A free uptime check with GitHub Actions that opens (and closes) an issue for you

DEV Community: github·upordown.online·13 days ago
#9WOAJn6R
#devtogithub#technology#devto#dev#down
Reading 0:00
15s threshold

You don't need a monitoring stack to know your side project is down. If the code already lives on GitHub, a scheduled workflow can check your URLs and use issues as incidents : open one when a check fails, comment while it stays down, and close it when the site recovers. Issue notifications go to your email and phone, so alerting comes for free.

This post builds that in about 70 lines, and then covers the limits honestly, because there are some.

What you'll get

A check every 10 minutes (more on why not every minute below).

One open issue per down URL, not a new issue every run.

Automatic close with a "recovered after N minutes" comment.

No secrets beyond the built-in GITHUB_TOKEN .

The URL list

Create .github/uptime/urls.txt :

https://example.com https://example.com/login https://api.example.com/healthz

Enter fullscreen mode

Exit fullscreen mode

The check script

.github/uptime/check.sh checks each URL with sensible timeouts and writes the failures to a file:

#!/usr/bin/env bash set -uo pipefail…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.