GitHub Actions
First-party UptimeWarden GitHub Actions for heartbeat pings, monitor sync, deploy markers, and pre-deploy gates.
UptimeWarden ships first-party GitHub Actions so you can wire monitoring into any workflow. All Actions are free for every plan, gating happens at the API level, not at the Action level.
Authentication
Every Action that talks to UptimeWarden authenticates with an API token (prefix uptw_…). Create one from More › Developers › API & Tokens, store it as a repository or organisation secret (UW_API_TOKEN is the conventional name), and reference it as ${{ secrets.UW_API_TOKEN }}.
notify-deploy-start + notify-deploy-finish need a token with the deploys:write and monitors:maintenance:write permissions; the Deploy Manager preset covers them. A Monitor Manager token does not carry them and gets a 403.
heartbeat is an exception, it uses a per-monitor heartbeat token (UW_HEARTBEAT_TOKEN) issued from the monitor's settings page, because heartbeats are per-monitor by design and don't need a separate API token.
check does not require an UptimeWarden account, it authenticates via GitHub OIDC (your workflow needs permissions: id-token: write). Supplying an optional api-token upgrades you to plan-derived limits.
Available now
All seven Actions live in the public repository github.com/UptimeWarden/actions, one folder per Action. Reference them as:
- uses: uptimewarden/actions/<name>@v1
Each folder's README lists every input and output. See Versioning for how @v1 moves.
uptimewarden/actions/heartbeat
Send a heartbeat ping from any CI step.
- name: Notify UptimeWarden after deploy
uses: uptimewarden/actions/heartbeat@v1
with:
token: ${{ secrets.UW_HEARTBEAT_TOKEN }}
state: success
message: 'Deploy ${{ github.sha }} done'
Failure path:
- name: Notify UptimeWarden on failure
if: failure()
uses: uptimewarden/actions/heartbeat@v1
with:
token: ${{ secrets.UW_HEARTBEAT_TOKEN }}
state: failure
message: 'Deploy ${{ github.sha }} failed'
Inputs: token (required), state (success | failure, default success), message, base-url.
Outputs: status (HTTP status code).
The Action is a composite Action, under the hood it is just a curl step, so it runs on any GitHub-hosted or self-hosted runner without language-specific setup.
uptimewarden/actions/notify-deploy-start + uptimewarden/actions/notify-deploy-finish
Record a deploy marker in UptimeWarden and optionally mute the chosen monitors for the duration of the deploy. The marker is listed by GET /api/v1/deploys, shows on the incident detail timeline, and is added to alerts when the deploy started within the 2 hours before the alert: a recentDeploy object in the webhook payload, a deploy line in the Slack alert and {{recentDeploy}} in notification templates. Ships as two paired composite actions because composite Actions don't support runs.post: hooks, pair them with if: always() on the finish step.
- uses: uptimewarden/actions/notify-deploy-start@v1
id: deploy
with:
api-token: ${{ secrets.UW_API_TOKEN }}
service: api
version: ${{ github.sha }}
environment: production
monitors: 01HXYZ0AAAAAAAAAAAAAAAAAAA,01HXYZ0BBBBBBBBBBBBBBBBBBB
mute-ceiling: 30m
mute-reason: 'Deploy ${{ github.sha }}'
- run: ./deploy.sh
- uses: uptimewarden/actions/notify-deploy-finish@v1
if: always()
with:
api-token: ${{ secrets.UW_API_TOKEN }}
deploy-id: ${{ steps.deploy.outputs.deploy-id }}
monitor-windows: ${{ steps.deploy.outputs.monitor-windows }}
status: ${{ job.status }}
Lifecycle:
- Start step: posts to
/api/v1/deploys(the deploy marker). Ifmonitorsis set, opens atype: 'once'maintenance window on each (start = now,end = now + mute-ceiling). AnIdempotency-Keyderived from the deployId prevents retried main steps from stacking duplicate windows. - Workflow continues with build, deploy, smoke tests, etc.
- Finish step (with
if: always(), runs on success/failure/cancel): deletes the windows that were opened, so a deploy that finishes in 90 seconds re-enables alerts after 90 seconds, not 30 minutes. Patches the deploy marker with the final status (stampscompletedAt). - If the finish step never runs (runner crash, network outage, user forgot to wire it), the
mute-ceilingensures the window expires on its own, server enforces a hard 4h cap. No "stuck mute" possible.
Recovery events (a monitor returning to up) are exempt from suppression even inside a maintenance window, so an open incident can still self-resolve while the window is active.
Both actions accept a base-url input (default https://app.uptimewarden.online).
uptimewarden/actions/check-incidents
Pre-deploy gate. Fails the step with a non-zero exit if any active incident on the configured monitors is at or above the severity threshold, so you don't deploy into a fire. It calls GET /api/v1/incidents?status=active and does the severity comparison and monitor filtering client-side with jq.
- uses: uptimewarden/actions/check-incidents@v1
with:
api-token: ${{ secrets.UW_API_TOKEN }}
monitors: 01HXYZ0AAAAAAAAAAAAAAAAAAA,01HXYZ0BBBBBBBBBBBBBBBBBBB
severity-threshold: major # minor | major | critical (default: major)
bypass: false # true → log but don't block
Inputs: api-token (required), monitors (csv, optional, if empty, every monitor you own), severity-threshold (minor | major | critical, default major), bypass (default false), base-url.
Outputs: blocked (bool), incident-count, incidents-json.
severity-threshold: major passes minor incidents through; major + critical block. UptimeWarden incidents carry a severity of critical, major, minor or warning. The gate evaluates only minor, major and critical incidents; slow-response, flapping and SLO incidents carry warning, so they never block at any threshold. bypass: true gives visibility without disabling the gate, outputs are still populated but the step exits successfully; use with care in production gates.
When chained with notify-deploy-start, the typical flow is: check-incidents → notify-deploy-start → deploy → notify-deploy-finish (if: always()).
uptimewarden/actions/postmortem-link
On a PR merge event, it picks up Fixes #incident-<publicId> / Closes #incident-<publicId> / Resolves #incident-<publicId> references in the PR body and posts an update to each incident's timeline (PR URL + title + merge author). It calls POST /api/v1/incidents/:id/comments, so the token needs the incidents:comment permission (incidents:update is not enough) and edit access to the incident's monitor.
name: Link postmortem on merge
on:
pull_request:
types: [closed]
jobs:
link:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: uptimewarden/actions/postmortem-link@v1
with:
api-token: ${{ secrets.UW_API_TOKEN }}
Recognised patterns in the PR body (case-insensitive):
Fixes #incident-01HXYZ0AAAAAAAAAAAAAAAAAAA
Closes #incident-01HXYZ0BBBBBBBBBBBBBBBBBBB
Resolves #incident-01HXYZ0CCCCCCCCCCCCCCCCCCC
The <publicId> is the 26-character identifier that appears in UptimeWarden's URLs and API responses (you can copy it from the incident detail page's address bar).
Outputs: matched-incidents (csv), linked-count.
What it does not do:
- It does not resolve the incident: a merged PR is a signal, not a decision. The action only appends a record to the incident timeline; the incident's own
statusfield (open/acknowledged/investigating/monitoring/resolved) stays in the on-call human's hands. - It does not edit the postmortem document: postmortems are AI-generated + human-edited, and the action doesn't touch them. It may be extended in the future to add PR links to
evidenceRefs.
Failure modes: 404 (incident publicId not found or not visible to the token), 403 (no editor access to the incident's monitor), other HTTP errors, all logged as ::warning:: and never fail the workflow. The step only exits non-zero on a configuration error (missing api-token).
uptimewarden/actions/check
One-shot multi-region uptime check from any GitHub workflow, no UptimeWarden account required. Useful for CI smoke tests, post-deploy verification, or simply answering "is my site reachable from the other side of the world?". Checks run on UptimeWarden's existing global monitoring infrastructure; customer monitor checks always take priority.
- uses: uptimewarden/actions/check@v1
id: probe
with:
url: https://example.com
regions: gwc,wus3,sea # optional - default: gwc; more than 1 needs api-token
api-token: ${{ secrets.UW_API_TOKEN }} # optional - plan limits apply
expect-status: 200 # optional - default: 2xx
timeout: 10s # optional - default: 30s
fail-on-down: true # optional - default: true
- run: echo "Slowest region ${{ steps.probe.outputs.slowest-region-ms }}ms"
Outputs: up (bool), regions-down (csv), slowest-region-ms, result-json.
Auth: GitHub OIDC token. The action just needs permissions: id-token: write, no UW API token required. If you supply api-token, the token is verified and your plan's limits apply to your account. An unknown or revoked token answers 401 invalid-token and an expired one 401 token-expired; neither falls back to the no-account limits. Results go back to the workflow only; they are not saved to a monitor's history.
Limits:
A check is one request: it counts once against the daily budget however many regions it names. Without regions the check runs from gwc only. Asking for more regions than your tier allows answers 409 too-many-regions (with the allowed max). An exhausted budget answers 429 rate-limit-org with Retry-After; the budget resets at 00:00 UTC.
| Caller | Checks per day | Regions per check |
|---|---|---|
| No account (GitHub OIDC only) | 5 per repository owner | 1 |
| API token, Free | 100 | 2 |
| API token, Hobby | 250 | 3 |
| API token, Starter | 500 | 3 |
| API token, Professional | 2,000 | 5 |
| API token, Enterprise | 5,000 | 5 |
| API token, plan with no configured limits | 5 | 1 |
- With a token, regions per check are your plan's verification region limit: the same number that caps how many regions can confirm a monitor outage. There is no separate public-check region setting.
- All of one user's tokens share one daily budget; a second token does not open a second budget.
- The table shows the defaults. Values are set per plan, so a custom or adjusted plan can differ.
- Global per-target cap: 60 checks/min per hostname across all callers. Prevents UptimeWarden from being used as a DDoS amplifier.
Good citizenship:
- Prober uses
User-Agent: uptimewarden-check/1.0 (+mailto:[email protected]). - A target that returns
X-Uptime-Warden-Optout: trueis reported asdownwith errortarget-opted-outfor that probe. There is no automatic exemption window: later checks still reach the target, within the 60 per minute hostname cap. - Probes only reach public addresses. Private, loopback, link-local and cloud-metadata addresses are refused, including when a hostname switches to one after validation.
- To report abuse or ask for a hostname to be blocked, write to
[email protected].
uptimewarden/actions/sync-monitors
Installs @uptimewarden/cli and runs uw apply against your config file. On pull requests it shows the plan (dry-run); on push to main it applies.
# Full workflow: plan on PR, apply on main
name: Sync monitors
on:
push:
branches: [main]
paths: ['monitors.uw.json']
pull_request:
paths: ['monitors.uw.json']
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: uptimewarden/actions/sync-monitors@v1
with:
api-token: ${{ secrets.UW_API_TOKEN }}
mode: ${{ github.event_name == 'pull_request' && 'diff' || 'apply' }}
Inputs: api-token (required), config-file (default monitors.uw.json), mode (apply|diff|plan, default apply), allow-delete (default false), node-version (default 20), base-url.
Outputs: created, updated, deleted, has-drift.
The action writes a job summary showing changes applied (apply mode) or the plan diff (diff/plan mode).
Job summaries
All seven Actions write a rich markdown summary to $GITHUB_STEP_SUMMARY after each run. The summary is visible directly in the GitHub Actions run UI, no need to dig through logs.
| Action | Summary content |
|---|---|
heartbeat | State (success/failure) + HTTP status |
check | Per-region table with 🟢/🔴 status and response time |
check-incidents | Incident table when blocked (severity/monitor/title); ✅ clear message when gate passes |
notify-deploy-start | Service, version, environment, deploy ID, muted monitor count |
notify-deploy-finish | ✅/❌/⚠️ deploy status + deploy ID |
postmortem-link | PR + linked incident IDs (only emitted when links are found) |
sync-monitors | Changes table (created/updated/deleted) or plan diff |
Versioning
Releases of UptimeWarden/actions are tagged v1.x.y, and v1 is a moving tag that points at the latest v1 release. Pin to @v1 to receive non-breaking updates automatically, to an exact tag such as @v1.0.0, or to a commit SHA for full reproducibility. Breaking changes will ship as v2.
Base URL
Every Action accepts a base-url input (default https://app.uptimewarden.online). The Actions have no dependency on UptimeWarden-hosted services beyond the API endpoints they call.
See also
- Source and issues: the Actions repository
- CLI reference: the Actions wrap the same endpoints the CLI uses
- Monitoring as Code: declare monitors that
sync-monitorsapplies - Quickstart: get a heartbeat working end-to-end in 60 seconds