Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification
Rocket.Chat Notification for GitHub Actions :bell: :rocket:
https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification
Last synced: about 2 months ago
JSON representation
Rocket.Chat Notification for GitHub Actions :bell: :rocket:
- Host: GitHub
- URL: https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification
- Owner: RocketChat
- License: mit
- Created: 2019-11-23T19:16:16.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T21:14:34.000Z (6 months ago)
- Last Synced: 2024-07-11T05:33:07.231Z (2 months ago)
- Language: TypeScript
- Size: 271 KB
- Stars: 18
- Watchers: 6
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - RocketChat/Rocket.Chat.GitHub.Action.Notification - Rocket.Chat Notification for GitHub Actions :bell: :rocket: (TypeScript)
README
# Rocket.Chat.GitHub.Action.Notification
![](https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification/workflows/TS%20Lint%20Check/badge.svg)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/RocketChat/Rocket.Chat.GitHub.Action.Notification?color=brightgreen)
![GitHub](https://img.shields.io/github/license/RocketChat/Rocket.Chat.GitHub.Action.Notification?color=brightgreen)This is Rocket.Chat Notification for GitHub Actions.
Forked from [homoluctus/slatify](https://github.com/homoluctus/slatify). Thanks a lot for your awesome work!# Feature
- Notify the result of GitHub Actions
- Support three job status (reference: [job-context](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#job-context))
- success
- failure
- cancelled
- Mention
- Notify message to channel members efficiently
- You can specify the condition to mention# How to use
First of all, you need to set GitHub secrets for ROCKETCHAT_WEBHOOK that is Incoming Webhook URL.
You can customize the following parameters:|with parameter|required/optional|default|description|
|:--:|:--:|:--|:--|
|type|required|N/A|The result of GitHub Actions job
This parameter value must contain the following word:
- `success`
- `failure`
- `cancelled`
We recommend using ${{ job.status }}|
|job_name|required|N/A|Means rocket.chat notification title|
|url|required|N/A|Rocket.Chat Incoming Webhooks URL
Please specify this key or ROCKETCHAT_WEBHOOK environment variable
※ROCKETCHAT_WEBHOOK will be deprecated|
|mention|optional|N/A|Rocket.Chat message mention|
|mention_if|optional|N/A|The condition to mention
This parameter can contain the following word:
- `success`
- `failure`
- `cancelled`
- `always`|
|icon_emoji|optional|Use Rocket.Chat Incoming Webhook configuration|Rocket.Chat icon|
|username|optional|Use Rocket.Chat Incoming Webhook configuration|Rocket.Chat username|
|channel|optional|Use Rocket.Chat Incoming Webhook configuration|Rocket.Chat channel name|
|commit|optional|false|If true, Rocket.Chat notification includes the latest commit message and author.|
|token|case by case|N/A|This token is used to get commit data.
If commit parameter is true, this parameter is required.
${{ secrets.GITHUB_TOKEN }} is recommended.|Please refer `action.yml` for more details.
## Examples
```..github/workflows/example1.yml
- name: Rocket.Chat Notification
uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master
if: always()
with:
type: ${{ job.status }}
job_name: '*Lint Check*'
mention: 'here'
mention_if: 'failure'
channel: '#random'
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
```↓ Including the latest commit data
```..github/workflows/example2.yml
- name: Rocket.Chat Notification
uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master
if: always()
with:
type: ${{ job.status }}
job_name: '*Lint Check*'
mention: 'here'
mention_if: 'failure'
channel: '#random'
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}
```# Rocket.Chat UI Example
# Contribute
1. Fork this repository
2. Pull your repository in local machine
3. Update original repository
4. Checkout "master" branch based "remotes/origin/master" branch
5. Work on "master" branch
6. Push you changes to your repository
7. Create a new Pull Request# LICENSE
[The MIT License (MIT)](https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification/blob/master/LICENSE)