mirror of
https://github.com/jadolg/rocketchat-notification-action.git
synced 2026-10-09 12:40:43 +09:00
Update readme with parameters and example
This commit is contained in:
@@ -1,4 +1,51 @@
|
|||||||
# Rocket.Chat notifications GitHub action
|
# Rocket.Chat notifications GitHub action
|
||||||
|
|
||||||
This is my first action so I'll experiment here.
|
This action will write a message on your rocket.chat server using credentials instead of a webhook.
|
||||||
I'll write nice docs once I have at least a POC.
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
|
### `user`
|
||||||
|
|
||||||
|
**Required** The username to login to your rocket.chat server.
|
||||||
|
|
||||||
|
### `password`
|
||||||
|
|
||||||
|
**Required** The password to login to your rocket.chat server.
|
||||||
|
|
||||||
|
### `message`
|
||||||
|
|
||||||
|
**Required** The message you want to send.
|
||||||
|
|
||||||
|
### `server`
|
||||||
|
|
||||||
|
Your rocket.chat server. Default `"https://open.rocket.chat"`.
|
||||||
|
|
||||||
|
### `channel`
|
||||||
|
|
||||||
|
The channel you want to write to. Default `"GENERAL"`.
|
||||||
|
|
||||||
|
### `code`
|
||||||
|
|
||||||
|
Set it to true if you wish to have a code block. Default `"false"`.
|
||||||
|
|
||||||
|
## Example usage
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rocketchat_job:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Push notification to rocket.chat
|
||||||
|
steps:
|
||||||
|
- name: Push notification to rocket.chat if the job failed
|
||||||
|
id: error-notification
|
||||||
|
if: ${{ failure() }}
|
||||||
|
uses: jadolg/rocketchat-notification-action@1.0.0
|
||||||
|
with:
|
||||||
|
server: ${{ secrets.ROCKETCHAT_SERVER }}
|
||||||
|
message: Wooops! Looks like something went wrong!
|
||||||
|
user: ${{ secrets.ROCKETCHAT_USER }}
|
||||||
|
password: ${{ secrets.ROCKETCHAT_PASSWORD }}
|
||||||
|
channel: alerts
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user