-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,31 @@ | ||
`notify-discord` is a docker image that sends message to Discord using webhooks. | ||
|
||
## Usage | ||
|
||
I wrote this action to send a message to Discord when a GitHub action completes. | ||
|
||
1. Create a webhook on your Discord server's settings. | ||
1. Add the webhook URL to your repo's/organization's secrets with the name of `DISCORD_WEBHOOK_URL`. Or if you don't mind, you can directly paste the URL into the action file replacing `${{ secrets.DISCORD_WEBHOOK_URL }}`. | ||
|
||
By default, if a step fails, GitHub actions doesn't trigger the following ones. If you add `if: ${{ always() }}`, this action includes the status of the action in the message that is sent to Discord. | ||
|
||
```yaml | ||
steps: | ||
- name: Your previous build steps | ||
|
||
- name: Notify discord | ||
uses: th0th/[email protected] | ||
if: ${{ always() }} | ||
env: | ||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | ||
GITHUB_ACTOR: ${{ github.actor }} | ||
GITHUB_JOB_STATUS: ${{ job.status }} | ||
``` | ||
## Shameless plug | ||
I am an indie hacker and I am running an uptime monitoring and analytics platform called [WebGazer](https://www.webgazer.io). You might want to check it out if you are running an online business and want to notice the incidents before your customers. | ||
## License | ||
Copyright © 2020, Gökhan Sarı. Released under the [MIT License](LICENSE). | ||
Copyright © 2021, Gökhan Sarı. Released under the [MIT License](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters