gawg-notify

This action belongs to the GAWG workflow and is used to notify users about the running workflow. Mail, Teams and Slack are some of the supported channels.

OTHER License

Stars
1
Committers
1

GAWG Notify Action

This action sends a notification containing workflow information to the desired channel.

Inputs

  • messaging_app: (required) Messaging app to send the notification to. Options: none, email, slack, msteams, discord, telegram.
  • artifact_name: (required) Name of the artifact generated by the build.
  • technology: (required) Technology used in the project.
  • docker: (required) Whether Docker is enabled or not.
  • self-hosted-runner: (required) Whether self-hosted runners are used or not.
  • deployment: (required) Deployment type.
  • SLACK_CHANNEL: (optional) Slack channel to send the notification to.
  • SLACK_TOKEN: (optional) Slack token to authenticate the request.
  • DISCORD_WEBHOOK_URL: (optional) Discord webhook URL to send the notification to.

Usage

General Setup

Add the action to your workflow file:

- name: GAWG Notify
  uses: your-username/gawg-notify@v1
  with:
    messaging_app: 'slack' # or 'discord', 'msteams', 'telegram', 'email', 'none'
    artifact_name: 'your-artifact-name'
    technology: 'your-technology'
    docker: true
    self-hosted-runner: false
    deployment: 'your-deployment-type'
    SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
    SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
    DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}

Slack Notification

  1. Obtain Slack Channel ID:
  • Right-click on the channel name in Slack and select 'Copy link'. The channel ID is the last part of the URL.
  1. Obtain Slack Token:
  • Create a new Slack app at https://api.slack.com/apps.
  • Install the app to your workspace and get the Bot User OAuth Token from the 'OAuth & Permissions' section.
  1. Add to GitHub Secrets:
  • Go to your GitHub repository settings.
  • Navigate to 'Secrets and variables' > 'Actions'.
  • Add SLACK_CHANNEL and SLACK_TOKEN as secrets.

Discord Notification

  1. Obtain Discord Webhook URL:
  • Go to your Discord server settings.
  • Navigate to 'Integrations' and create a new webhook.
  • Copy the webhook URL.
  1. Add to GitHub Secrets:
  • Go to your GitHub repository settings.
  • Navigate to 'Secrets and variables' > 'Actions'.
  • Add DISCORD_WEBHOOK_URL as a secret.

Microsoft Teams Notification

Note: Microsoft Teams notifications are not supported in the free plan. Please upgrade to the premium plan to use this feature.

Telegram Notification

Note: Telegram notifications are not supported in the free plan. Please upgrade to the premium plan to use this feature.

Email Notification

Note: Email notifications are not supported in the free plan. Please upgrade to the premium plan to use this feature.

No Notification Needed

Set messaging_app to none if no notification is needed. Example Workflow

- name: GAWG Notify
  uses: your-username/gawg-notify@v1
  with:
    messaging_app: 'none'
    artifact_name: 'your-artifact-name'
    technology: 'your-technology'
    docker: true
    self-hosted-runner: false
    deployment: 'your-deployment-type'

Example workflow

name: CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Run GAWG Notify
      uses: your-username/gawg-notify@v1
      with:
        messaging_app: 'slack'
        artifact_name: 'my-artifact'
        technology: 'nodejs'
        docker: true
        self-hosted-runner: false
        deployment: 'production'
        SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
        SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}