Skip to content

Commit

Permalink
Merge pull request #6 from filipkule/master
Browse files Browse the repository at this point in the history
Implemented 'pull-request' handler for pull requests
  • Loading branch information
kalevski authored Oct 14, 2020
2 parents 4e5cffd + 172d8c9 commit 52b77f2
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 122 deletions.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand Down
Loading

0 comments on commit 52b77f2

Please sign in to comment.