1.0.8 • Published 6 months ago

action-notifications v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Github actions notification to Discord, Slack, Telegram, Google chat, Microsoft Teams


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 }}
  google_chat_webhook: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
  ms_teams_webhook: ${{ secrets.MS_TEAMS_WEBHOOK }}
  title: "Deploy to Dev"
  description: "Test here: https://hung.thedev.id"

Inputs

PropertiesDescription
discord_webhookDiscord Webhook
slack_webhookSlack Webhook
slack_usernameSlack Username
telegram_bot_tokenTelegram Bot TokenRequire telegram_chat_id
telegram_chat_idTelegram Chat IDRequire telegram_bot_token
google_chat_webhookGoogle Chat Webhook
ms_teams_webhookMicrosoft Teams Webhook
titleTitle
descriptionDescription
qrcodeText

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 }}
          google_chat_webhook: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
          ms_teams_webhook: ${{ secrets.MS_TEAMS_WEBHOOK }}
          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 }}
          google_chat_webhook: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
          ms_teams_webhook: ${{ secrets.MS_TEAMS_WEBHOOK }}
          title: "Deploy to Dev"
          description: "Test here: https://hung.thedev.id"

Results

  • Discord

Discord

  • Slack

Slack

  • Telegram

Telegram

  • Google Chat

Google Chat

  • Microsoft Teams

Microsoft Teams