-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from filipkule/master
Implemented 'pull-request' handler for pull requests
- Loading branch information
Showing
4 changed files
with
250 additions
and
122 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 |
---|---|---|
|
@@ -8,7 +8,7 @@ The goal of this action is to produce helpful messages on your Discord server ba | |
|
||
- [x] Release | ||
- [ ] Pull Request | ||
- [ ] Push (branches / tags) | ||
- [x] Push (branches / tags) | ||
- [ ] Page build | ||
|
||
## Getting Started: | ||
|
@@ -21,8 +21,10 @@ The webhook URL to use. This should be in a repository secret and the secret sho | |
#### `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: | ||
|
@@ -39,6 +41,24 @@ jobs: | |
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/[email protected] | ||
with: | ||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} | ||
handler: 'push' | ||
``` | ||
## Contributing | ||
|
Oops, something went wrong.