Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

GitHub Action to notify Discord of workflow statuses 🤖

License

Notifications You must be signed in to change notification settings

Anshuman-37/discord-workflow-status

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Workflow Status Action

Notify Discord of workflow statuses 🤖

Inputs

Input Name Description Required Default
strict If the action should fail in the absence of discord-webhook [1] true
github-token GitHub Token [2] ✅
discord-webhook Discord Webhook URL "" (an empty string)
username Overrides the current username of the webhook GitHub Actions
avatar-url Overrides the current avatar of the webhook Avatar

[1] strict was added to ease forking repositories depending on this action as the webhook should be a secret (which, unless you add it, will not be available in forks). If strict is false, the action will not fail in the absence of discord-webhook and instead return a "success" status. Once GitHub adds full support for core.setNeutral, instead of resulting in "success" (which fails to properly describe the action result), this action should result in "neutral" (or whatever name they decide for it).

[2] The GitHub token is required because this action reads the current workflow's jobs. See octokit.actions.listJobsForWorkflowRun for more information.

Example

name: Build and Test
on: [pull_request]

jobs:
  build:
    name: Build the Code
    steps:
      - run: make all
  notify:
    name: Notify Discord
    runs-on: ubuntu-latest
    if: ${{ always() }} # You always want to be notified: success, failure, or cancelled
    needs:
      - build
    steps:
      - name: Notify
        uses: jmg-duarte/workflow-notify-discord@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}

About

GitHub Action to notify Discord of workflow statuses 🤖

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%