Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
package

GitHub Action

Github Action Notification

v1.0.2

Github Action Notification

package

Github Action Notification

Github Action Notification with Discord and Slack

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Github Action Notification

uses: hunghg255/[email protected]

Learn more about this action in hunghg255/action-notifications

Choose a version

Github actions notification to Discord, Slack, Telegram


Fork from actions-status-discord

Usage

uses: hunghg255/action-notifications@master
with:
  discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}
  slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
  telegram_bot_token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
  telegram_chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
  title: "Deploy to Dev"
  description: "Test here: https://hung.thedev.id"

Inputs

Properties Description
discord_webhook Discord Webhook
slack_webhook Slack Webhook
telegram_bot_token Telegram Bot Token Require telegram_chat_id
telegram_chat_id Telegram Chat ID Require telegram_bot_token
title Title
description Description

Example

name: Notification

on:
  push:
    branches:
      - nofication

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Build and lint
        run: |
          echo "Build and lint"

      - name: Notification Failure
        if: failure()
        uses: hunghg255/action-notifications@master
        with:
          discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}
          slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
          telegram_bot_token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
          telegram_chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
          title: "Deploy to Dev"
          description: "Test here: https://hung.thedev.id"

  notifification:
    needs: deploy
    runs-on: ubuntu-latest

    steps:
      - name: Notification Success
        uses: hunghg255/action-notifications@master
        if: always()
        with:
          discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}
          slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
          telegram_bot_token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
          telegram_chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
          title: "Deploy to Dev"
          description: "Test here: https://hung.thedev.id"

Results

  • Discord Discord

  • Slack Slack

  • Telegram

Telegram