Skip to content
message-square

GitHub Action

Discord Message Notify

v1.1.0 Latest version

Discord Message Notify

message-square

Discord Message Notify

Sending a Discord message

Installation

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

              

- name: Discord Message Notify

uses: appleboy/discord-action@v1.1.0

Learn more about this action in appleboy/discord-action

Choose a version

🚀 Discord for GitHub Actions

GitHub Action for sending a Discord notification message.

Actions Status

message

Important: Only support Linux docker container.

Features

  • Send Multiple Messages
  • Send Multiple Files

Usage

Send custom message as below

name: discord message
on: [push]
jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: send custom message with args
      uses: appleboy/discord-action@master
      with:
        webhook_id: ${{ secrets.WEBHOOK_ID }}
        webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
        args: The ${{ github.event_name }} event triggered first step.

Input variables

  • webhook_id - required. webhook id of channel.
  • webhook_token - required. webhook token of channel.
  • username - optional. override the default username of the webhook
  • avatar_url - optional. override the default avatar of the webhook
  • color - optional. color code of the embed
  • file - optional. send file message

Example

Send custom message in message

- name: send message
  uses: appleboy/discord-action@master
  with:
    webhook_id: ${{ secrets.WEBHOOK_ID }}
    webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
    message: The ${{ github.event_name }} event triggered first step.

Send the default message.

- name: send message
  uses: appleboy/discord-action@master
  with:
    webhook_id: ${{ secrets.WEBHOOK_ID }}
    webhook_token: ${{ secrets.WEBHOOK_TOKEN }}

Send the message with custom color and username

- name: send message
  uses: appleboy/discord-action@master
  with:
    webhook_id: ${{ secrets.WEBHOOK_ID }}
    webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
    color: "#48f442"
    username: "GitHub Bot"
    message: "A new commit has been pushed with custom color."

Send multiple files

- name: send message
  uses: appleboy/discord-action@master
  with:
    webhook_id: ${{ secrets.WEBHOOK_ID }}
    webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
    file: "./images/message.png"
    message: "Send Multiple File."