Alerting on pipeline events
Configure alerts for events in GitHub Actions and Azure Pipelines
Routes
| Platform | Mechanism |
|---|---|
| Azure Pipelines | Notification subscriptions · service hooks · the Teams app |
| GitHub Actions | Workflow notifications · webhooks · the Teams/Slack app |
Either can also call out from within the run — a step that posts on failure — which is the flexible option when the condition is more specific than "the run failed".
What deserves an alert
The same discipline as everywhere else in this unit: alert on things a human must act on.
| Alert | Do not alert |
|---|---|
main build broken | Every successful run |
| Deployment awaiting approval | Every stage transition |
| Release failed in production | Every PR build result |
| Scheduled security scan failed | Every dependency update PR |
The condition that gets forgotten
A step that reports failure must itself run on failure. Every step carries an implicit succeeded(), so a notification step placed after a failing step is skipped — the same defect as publishing test results without condition: succeededOrFailed().
- script: ./notify.sh
condition: failed()A failure notification that only fires on success is worse than none, because the silence is read as good news.
Route to an owner
An alert to a shared inbox nobody owns is not an alert. Route to a team with the ability to act, and make ownership explicit.
Primary sources