Skip to main content
Send API Alerts notifications directly from your GitHub Actions workflows. Get notified on deployments, test results, releases, and more.

Usage

- name: Send Notification
  uses: apialerts/notify-action@v2
  with:
    api_key: ${{ secrets.API_ALERTS_KEY }}
    message: "Deployment successful"

Inputs

InputRequiredDescription
api_keyYesYour API Alerts workspace API key
messageYesThe notification message
channelNoTarget channel (defaults to workspace default)
linkNoURL to attach to the notification
tagsNoComma-separated tags for categorization

Examples

Deployment notification

name: Deploy
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # ... your deploy steps ...
      - name: Notify
        uses: apialerts/notify-action@v2
        with:
          api_key: ${{ secrets.API_ALERTS_KEY }}
          message: "Deployed ${{ github.sha }} to production"
          channel: "deployments"
          link: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
          tags: "deploy,production"

Test failure notification

- name: Notify on failure
  if: failure()
  uses: apialerts/notify-action@v2
  with:
    api_key: ${{ secrets.API_ALERTS_KEY }}
    message: "Tests failed on ${{ github.ref_name }}"
    channel: "ci"
    tags: "tests,failure"

Resources

GitHub Marketplace

View on GitHub Marketplace.

Source Code

Full source code and documentation.