feat(actions): add notify-irm composite action#51
Merged
DevSecNinja merged 1 commit intomainfrom May 1, 2026
Merged
Conversation
Posts an alert state (alerting/ok) to a Grafana IRM Custom webhook. Reusable across repos that want to page on main-branch CI failure and auto-resolve on green. alert_uid is keyed on <repo>-<workflow>-<branch> so successful re-runs and follow-up commits on the same branch resolve the open incident.
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a reusable composite action
notify-irmso any repo in the org can wire its CI workflows to the homelab Grafana IRM pager with a singleuses:line.The action POSTs a Grafana IRM Custom webhook payload:
state=alerting(severity=critical) when any prior job failed/was cancelled.state=ok(severity=info) when all green — samealert_uidso the open incident auto-resolves.webhook-urlis empty, so the action is safe on forks and during initial bring-up.alert_uidis intentionallygha-<repo>-<workflow>-<branch>(no SHA) so successful re-runs and follow-up commits on the same branch resolve the incident from a previous failed commit.The
labelsblock on the payload carriesservice,service_name(Grafana IRM built-in for SLO/alert routing),source,repo,workflow,branch,sha,actor,severity— these surface as Assigned Labels on the IRM alert group when the integration's Multi-label Extraction Template is set to{{ payload.labels | tojson }}.Usage (caller workflow)
Inputs
webhook-urljob-failedtruewhen any prior job failed or was cancelled.serviceciserviceandservice_namelabels.resolve-on-successtruefalsefor one-shot workflows (e.g. tag-push releases) where alert_uid is unique per run.Origin
Extracted from the inline
notify-irmjob validated in DevSecNinja/truenas-apps#300 / #304. The truenas-apps follow-up PR will switch all push:main workflows to consume this action.