GitHub Action for sending a Discord notification message.
Important: Only supports Linux Docker containers.
- Send Multiple Messages
- Send Multiple Files
Send a custom message as shown below:
name: discord message
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: send custom message
uses: appleboy/discord-action@v1.2.0
with:
webhook_url: ${{ secrets.WEBHOOK_URL }}
message: The ${{ github.event_name }} event triggered first step.
- webhook_url: Webhook URL of the channel.
- webhook_id: Webhook ID of the channel.
- webhook_token: Webhook token of the 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 a file message.
- debug: (Optional) Enable debug mode.
Send a custom message using webhook_url
:
- name: send message
uses: appleboy/discord-action@v1.2.0
with:
webhook_url: ${{ secrets.WEBHOOK_URL }}
message: The ${{ github.event_name }} event triggered first step.
Send the default message:
- name: send message
uses: appleboy/discord-action@v1.2.0
with:
webhook_url: ${{ secrets.WEBHOOK_URL }}
Send the message with a custom color and username:
- name: send message
uses: appleboy/discord-action@v1.2.0
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@v1.2.0
with:
webhook_id: ${{ secrets.WEBHOOK_ID }}
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
file: "./images/message.png"
message: "Send Multiple File."