Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appleboy/discord-action
GitHub Action that sends a Discord message.
https://github.com/appleboy/discord-action
discord discord-bot github-actions
Last synced: 1 day ago
JSON representation
GitHub Action that sends a Discord message.
- Host: GitHub
- URL: https://github.com/appleboy/discord-action
- Owner: appleboy
- Created: 2019-02-24T01:28:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-08T15:26:15.000Z (4 months ago)
- Last Synced: 2024-10-29T10:07:29.133Z (3 months ago)
- Topics: discord, discord-bot, github-actions
- Language: Dockerfile
- Homepage: https://github.com/marketplace/actions/discord-message-notify
- Size: 105 KB
- Stars: 98
- Watchers: 3
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-actions - Send a File or Text Message to Discord (custom define color, username or avatar)
- fucking-awesome-actions - Send a File or Text Message to Discord (custom define color, username or avatar)
- awesome-workflows - Send a File or Text Message to Discord (custom define color, username or avatar)
README
# 🚀 Discord for GitHub Actions
[GitHub Action](https://developer.github.com/actions/) for sending a [Discord](https://discordapp.com/) notification message.
[![Actions Status](https://github.com/appleboy/discord-action/workflows/discord%20message/badge.svg)](https://github.com/appleboy/discord-action/actions)
![message](./images/message.png)
**Important**: Only support **Linux** [docker](https://www.docker.com/) container.
## Features
* [x] Send Multiple Messages
* [x] Send Multiple Files## Usage
Send custom message as below
```yaml
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`
```yaml
- 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.
```yaml
- 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
```yaml
- 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
```yaml
- 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."
```