Home

Awesome

🚀 Discord for GitHub Actions

GitHub Action for sending a Discord notification message.

Actions Status

message

Important: Only support Linux docker container.

Features

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

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."