You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Discord Message Notify
v1.0.0
GitHub Action for sending a Discord notification message.
- Send Multiple Messages
- Send Multiple Files
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.
- 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
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."