Skip to content

Action aimed at facilitating continuous delivery. You only need a Discord webhook to receive notifications for the completion status of your workflow. 🎉

License

Notifications You must be signed in to change notification settings

ErnaneJ/action-discord-alerts

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Action Discord Alerts 📢

Project   |    Use   |    Arguments   |    Test   |    Build   |    Contribute   


CI

Preview

💻 Project

Action aimed at facilitating continuous delivery. You only need a discord webhook to track the completion status of your workflow.

🚀 Use

  # ...
  - name: Action Discord Alert
    if: always()
    uses: ErnaneJ/action-discord-alerts@main
    with:
      webhook: ${{ secrets.DISCORD_WEBHOOK }}     
      status: ${{ job.status }}

📑 Arguments

Argument Required Default Description
webhook true - Discord webhook.
status false ${{ job.status }} Job status. Should be bound to job.status. Default to success.
content false - Standard message outside the information card. Can be used to mention users.
title false - For custom title only. By default it is filled with action job status.
description false - For custom description only. By default it is filled with author and commit message.
image false - Url of an Image that will be attached to the information card
thumbnail false - Url of an thumbnail that will be attached to the information card
color false - Overwrite the defined color for the info card highlight. By default this color is set by job status.
username false - Overrides Discord webhook username. By default we have Github Action.
avatar_url false - Overrides Discord webhook avatar url. By default we have Github image url.
event_info false true Decide whether or not to display drill-downs for some information. By default it is shown.
timestamp false true Controls whether to show the timestamp on the info card. Default pos is shown.
verbose false false Controls the sampling of some information when the script runs. For example, the payload that is assembled before being sent to discord.

💡 Test

The tests use Jest. To run them use:

npm run test

# To hide warnings set the silent environment variable.
export SILENT=true

🔥 Build

npm run build # use @vercel/ncc

🎉 Contribute

If you would like to implement or improve any feature feel free to submit a pull request. I would love to receive!


Developed with ❤ by Ernane Ferreira. 👋🏻

About

Action aimed at facilitating continuous delivery. You only need a Discord webhook to receive notifications for the completion status of your workflow. 🎉

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project