Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jadolg/rocketchat-notification-action
https://github.com/jadolg/rocketchat-notification-action
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jadolg/rocketchat-notification-action
- Owner: jadolg
- License: mit
- Created: 2020-08-14T13:20:13.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-15T11:55:10.000Z (about 4 years ago)
- Last Synced: 2024-03-15T14:07:29.115Z (8 months ago)
- Language: Dockerfile
- Size: 9.77 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- cuban-opensource - rocketchat-notification-action
README
# Rocket.Chat notifications GitHub action
This action will write a message on your rocket.chat server using credentials instead of a webhook.
## 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
### Push a chat notification when your job fails
```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/[email protected]
with:
server: ${{ secrets.ROCKETCHAT_SERVER }}
message: Wooops! Looks like something went wrong!
user: ${{ secrets.ROCKETCHAT_USER }}
password: ${{ secrets.ROCKETCHAT_PASSWORD }}
channel: alerts
```### Push a chat notification when someone opens a pull request in your project
```yaml
name: PR_alert
on:
pull_request:
types: [opened, reopened]
branches: [ master ]jobs:
alert:
runs-on: ubuntu-lateststeps:
- name: Push notification when a Pull Request is created
uses: jadolg/[email protected]
with:
message: Woop! Woop! A new Pull Request has being created at ${{ github.event.pull_request.html_url }}
user: ${{ secrets.ROCKETCHAT_USER }}
password: ${{ secrets.ROCKETCHAT_PASSWORD }}
channel: python_rocketchat_api
code: false
```