Back to the blog

GitHub Actions Notifications: Get Alerts When Workflows Fail

By François Loupias Updated 5 min read

  • github-actions
  • notifications
  • ci
  • monitoring
Squidly blog cover: Get alerts when GitHub Actions workflows fail. Next to it, a list of notifications, including a CI failure on main.

The short answer

GitHub can email you when a workflow fails, and a few lines of YAML can post a Slack alert from the workflow itself. These are good starting points, but notifications arrive one event at a time: they do not show whether all your repositories are healthy or which failures keep coming back.

If you are responsible for several repositories, combine alerts with a place to review recent runs. Monitoring GitHub Actions across multiple repositories explains when that consolidated view becomes useful.

Start with GitHub notifications

GitHub's notification settings for Actions let you choose how workflow run updates reach you:

  1. Open your Notification settings, then the System section.
  2. Under Actions, choose On GitHub, Email, or both.
  3. Select Only notify for failed workflows to stop receiving a message for every successful run.

That last option is the most useful one: it turns a noisy feed into a failure alert.

Two rules from GitHub's documentation on workflow run notifications explain most "I never got the email" surprises:

  • You are notified about workflow runs that you triggered. A run started by a teammate's push notifies them, not you.
  • Scheduled workflows notify the person who created the workflow, or the last person who changed its cron syntax or re-enabled it. If that person left the project, nobody hears about a failing nightly job.

Keep in mind as well:

  • An email represents an event, not a summary of every repository's current state.
  • A busy inbox can bury a failure among other updates.
  • A notification does not explain whether a failure is new, recurring or already fixed.

Use email as an early signal, then open the run in the repository's Actions tab to inspect the job and logs. The GitHub Mobile app can deliver the same notifications as push alerts.

Choose what to watch

Watching every repository can create too much noise; watching too few can leave gaps. Subscribe only to the activity you need, and review repository notification preferences when the volume becomes distracting.

For a small set of repositories, this can be enough: open the relevant run from the notification, confirm the failing step and fix it. If you need a repeatable investigation process, follow this step-by-step method for debugging a failing workflow.

Send a Slack alert when a workflow fails

GitHub's own notifications follow the person who triggered the run. When the whole team should know about a failure, for example on the default branch or on a scheduled job, send the alert from the workflow itself.

Add a last job that only runs when a previous job failed, using the failure() status check function, and the official Slack GitHub Action with an incoming webhook:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm test

  notify-failure:
    needs: test
    if: failure()
    runs-on: ubuntu-latest
    steps:
      - uses: slackapi/slack-github-action@v4.0.0
        with:
          webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
          webhook-type: incoming-webhook
          payload: |
            text: "❌ ${{ github.workflow }} failed on ${{ github.repository }} (${{ github.ref_name }}): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

A few tips:

  • Store the webhook URL as a repository or organization secret, never in the YAML file.
  • Limit alerts to the branches that matter (if: failure() && github.ref == 'refs/heads/main'), or the channel quickly becomes noise.
  • Include the link to the run in the message: the alert is only useful if it takes you straight to the logs.

The limit of this approach is maintenance: the job has to be added, and kept up to date, in every workflow of every repository.

What alerts cannot tell you

An alert says that something happened. It does not automatically answer:

  • Are other repositories failing at the same time?
  • Has this workflow failed repeatedly this week?
  • Is the failure isolated to a branch, runner or recent change?
  • Which run should the team investigate first?

Those questions require looking at run history and comparing activity across repositories. A central dashboard can help with that overview, while GitHub remains the source for workflow configuration and detailed logs. When a failure turns out to be transient, re-run only the failed job rather than the whole workflow.

When a dashboard complements notifications

If you only follow one or two repositories, GitHub's own notifications and Actions tabs are usually the simplest choice. As the number of repositories grows, a combined list can make it easier to spot failures that an individual email does not put into context.

Do you need a GitHub Actions dashboard? walks through the trade-offs. The Squidly GitHub Actions monitoring dashboard brings runs from the repositories you add into one view, with in-app notifications on workflow status updates; GitHub still runs the workflows and provides the underlying configuration and logs.

Situation A practical starting point
One project and a few runs GitHub notifications set to "Only notify for failed workflows"
A team that must react to failures on main A Slack alert job with if: failure()
Several repositories, checked occasionally Notifications plus a scheduled review of run history
Many repositories that need regular oversight Notifications plus a consolidated dashboard

A simple notification routine

  1. Choose the repositories and activity you need to follow.
  2. Turn on GitHub notifications for Actions, failed workflows only.
  3. Add a team alert (Slack or another chat tool) on the workflows where a failure blocks everyone.
  4. Open the run and inspect the failing job and step; do not rely on an alert to diagnose it.
  5. If failures are easy to miss across repositories, review a combined run history as well.
  6. Adjust subscriptions when useful alerts become noise.

The goal is not to receive every event. It is to notice the failures that need action without adding another daily inbox chore.

Conclusion

GitHub notifications are a lightweight way to hear about workflow failures, especially when you already know which repository matters, and a Slack alert job makes them visible to the whole team. They are not a cross-repository health report, though. Pair alerts with run history when you need context, and choose a dashboard only when checking repositories one by one becomes the larger problem.

If visibility across repositories is your main challenge, learn how the monitoring options compare, or see the Squidly plans: notifications are included in Premium, with a 14-day free trial.