Skip to content

ncatelli/action-discord

This branch is 1 commit ahead of Ilshidur/action-discord:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2ba75c5 Β· Apr 9, 2022
Aug 31, 2020
Nov 15, 2019
Nov 15, 2019
Nov 15, 2019
Nov 15, 2019
Jun 20, 2021
Jan 14, 2019
Jan 15, 2022
Jun 20, 2021
Apr 9, 2022
Nov 17, 2019
Apr 14, 2021
Apr 14, 2021
Nov 17, 2019
Jan 14, 2019

Repository files navigation

πŸš€ Discord for GitHub Actions

Build Status

Sends a Discord notification message. Simple as that. Supports all workflow event types by using the Discord GitHub webhooks.

Appearance on Discord :

Discord message

This GitHub action is part of a list of Actions that are located in an other repo. Feel free to check it out : https://github.com/Ilshidur/actions.

Compatibility note

As this Action is containerized with Docker, it can only run on Linux environments.

Docker container actions can only execute in the GitHub-hosted Linux environment. Self-hosted runners must use a Linux operating system and have Docker installed to run Docker container actions. For more information about the requirements of self-hosted runners, see "About self-hosted runners."


Usage

- name: Discord notification
  env:
    DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
  uses: Ilshidur/action-discord@master
  with:
    args: 'The project {{ EVENT_PAYLOAD.repository.full_name }} has been deployed.'

NOTICE : for stability purposes, it is recommended to use the action with an explicit commit SHA-1 :

Arguments

By default, the GitHub action will send a notificaction with the event informations. Providing the arguments will override the message.

Environment variables can be interpolated in the message using brackets ({{ and }}) :

e.g.: Action called : {{ GITHUB_ACTION }}

Event Payload data can also be interpolated in the message using brackets ({{ and }}) with the EVENT_PAYLOAD variable.

e.g.: Action called: {{ GITHUB_ACTION }} as {{ EVENT_PAYLOAD.pull_request.id }}

See the event types for valid payload informations.

Examples

  • args = "Hello, beautiful ! I ran a GitHub Actions for you <3"
  • args = "I showed you my commit. Please respond."

Environment variables

Alternatives

Because open source is about everyone :

https://github.com/marketplace/actions/discord-message-notify

TODO


Don't forget to 🌟 Star 🌟 the repo if you like this GitHub Action !
Your feedback is appreciated

About

πŸš€ GitHub Action that sends a Discord message.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.2%
  • Dockerfile 6.8%