GitHub Actions Notifications

Get a push notification the moment your workflow finishes, with a direct link to the build, deployment, or failed run.

Single notification

The smallest useful step. Inline your API key, done.

- uses: apialerts/notify-action@v2
  with:
    api_key: ${{ secrets.APIALERTS_API_KEY }}
    message: 'Build complete'

Multiple notifications

Two steps with if: success() and if: failure() so each branch has its own self-contained config. You can route them to different channels later without touching the workflow code.

Set APIALERTS_API_KEY once at the job (or workflow) level and every notify step inherits it - no need to repeat the credential.

jobs:
  deploy:
    env:
      APIALERTS_API_KEY: ${{ secrets.APIALERTS_API_KEY }}
    steps:
      - run: ./deploy.sh

      - if: success()
        uses: apialerts/notify-action@v2
        with:
          event: ci.deploy.success
          channel: developer
          message: '🚀 Deployed to staging'
          tags: deploy,staging
          link: 'https://appdistribution.firebase.google.com/testerapps/YOUR_APP_ID'

      - if: failure()
        uses: apialerts/notify-action@v2
        with:
          event: ci.deploy.failure
          channel: developer
          message: '❌ Staging build failed'
          tags: deploy,staging
          link: ${{ format('{0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id) }}

event is optional but recommended. Routers match it with Unix glob (fnmatch), so you can fan failures to one destination and successes to another later without changing this workflow code. Dotted keys like ci.deploy.success are a clean convention, but free-form keys with spaces (User Signup matched by User *) work just as well.

With all options

Every input the action accepts. data is a JSON string of arbitrary metadata - useful when non-push destinations (Slack, email, webhooks) need richer context than the message text alone.

- uses: apialerts/notify-action@v2
  with:
    api_key: ${{ secrets.APIALERTS_API_KEY }}
    event: user.signup
    message: 'New user signed up'
    channel: developers
    title: 'New Signup'
    tags: signup,organic
    link: 'https://dashboard.example.com/users/123'
    data: '{"plan": "pro", "region": "us-east-1", "sha": "${{ github.sha }}"}'

Inputs

InputDescription
api_keyAPI Alerts workspace API key. Optional if APIALERTS_API_KEY env var is set.
messageHuman-readable notification text. Required.
eventWhat kind of thing happened. Optional but recommended. Routers match this value with Unix glob (fnmatch): dotted keys like ci.deploy.success match ci.*, and free-form keys like User Signup match User *. Dotted notation is just a tidy convention, not a requirement.
channelTarget workspace channel. Defaults to the workspace default channel.
titleShort headline some destinations render separately from the message body.
tagsComma-separated tags for filtering and search.
linkURL associated with the event. Used as a deeplink on push and a call-to-action on routed destinations.
dataJSON string of key-value metadata. Available to non-push destinations for templating.

Why not just use GitHub’s notifications?

GitHub’s mobile app can notify you when a workflow finishes, but it stops there. You still have to navigate to the run, find the artifact, and figure out what to do next. With API Alerts:

  • Instant delivery - push notification arrives the moment the workflow completes
  • Direct links - tap the notification to open the build artifact, TestFlight, Firebase App Distribution, or the failed run
  • Custom messages - include the branch name, commit SHA, or any context you need
  • Channel routing - staging builds go to your developer channel, production releases go to the team

Built for mobile developers

Mobile CI builds can easily take 15-30 minutes. Instead of refreshing the Actions tab, context switch and get notified when the build is ready. Tap the notification and go straight to Firebase App Distribution or TestFlight to start testing.

Read our guide on mobile CI/CD build alerts for a full walkthrough with real Android and iOS workflows.

Works with any CI event

  • Deployments - know the moment your code hits production
  • Test suites - get alerted on failures without checking the PR
  • Scheduled workflows - confirm cron-style jobs ran successfully
  • Releases - notify your team when a new version is published
  • Security scans - immediate alerts on vulnerability findings

Get started

  1. Create a workspace and API key in the API Alerts dashboard
  2. Add APIALERTS_API_KEY to your repository secrets
  3. Add the apialerts/notify-action@v2 step to your workflow

View the action on the GitHub Marketplace or check the README for the full input reference and alternative approaches (npx CLI, curl).