Modified to have the same style as the default GitHub webhook.
This is mainly for my own personal use! There will be little to no support provided.
-
In Github secrets, add a
WEBHOOK_URL
variable with the Discord web hook URL. -
Inside your workflow file, add this snippet after the build-critical task:
- name: Send Webhook Notification if: always() run: | git clone https://github.com/Encode42/discord-workflows-webhook.git webhook bash webhook/send.sh ${{ job.status }} ${{ secrets.WEBHOOK_URL }} shell: bash
To see a working example, look at this workflow file.
-
That's all! Webhook notifications will automatically be sent on every workflow run.