https://github.com/bythope/discord-webhook-messages
GitHub action for posting messages on discord server
https://github.com/bythope/discord-webhook-messages
actions discord discord-bot github-actions hacktoberfest hacktoberfest2020
Last synced: 3 months ago
JSON representation
GitHub action for posting messages on discord server
- Host: GitHub
- URL: https://github.com/bythope/discord-webhook-messages
- Owner: bythope
- License: apache-2.0
- Created: 2020-10-14T12:28:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-15T22:32:07.000Z (over 5 years ago)
- Last Synced: 2026-02-10T22:41:01.967Z (4 months ago)
- Topics: actions, discord, discord-bot, github-actions, hacktoberfest, hacktoberfest2020
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/discord-webhook-messages
- Size: 371 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README



[](https://discord.gg/nRmqzq5)
The goal of this action is to produce helpful messages on your Discord server based on GitHub events.
### Supported events:
- [x] Release
- [ ] Pull Request
- [x] Push (branches / tags)
- [ ] Page build
## Getting Started:
### Inputs
---
#### `webhookUrl`
The webhook URL to use. This should be in a repository secret and the secret should be included here using `${{ secrets.DISCORD_WEBHOOK }}`. For security reasons it is not possible to default this to the secret name, so it must be supplied in every action invocation.
#### `handler`
Handler defines background logic of the action. Currently avaiable handlers:
- `release`: Publishes message to your discord server when release is created.
- `push`: Publishes message to your discord server when push action occurs.
---
### Example
#### Release Handler
```yaml
name: Discord Webhook Messages
on:
release:
types: [published]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Discord Webhook
uses: bythope/discord-webhook-messages@v1.1.0
with:
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
handler: 'release'
```
#### Push Handler
```yaml
name: Discord Webhook Messages
on:
push:
branches:
- '*'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Discord Webhook
uses: bythope/discord-webhook-messages@v1.1.0
with:
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
handler: 'push'
```
## Contributing
#### Resolve an issue
1. Read [CONTRIBUTING](CONTRIBUTING.md) guide
2. Make the changes
3. Read [Pull request](PULL_REQUEST_TEMPLATE.md) guide
#### Create feature request
1. Create issue for an idea
2. Explain your needs