This is Rocket.Chat Notification for GitHub Actions.
Forked from homoluctus/slatify. Thanks a lot for your awesome work!
- Notify the result of GitHub Actions
- Support three job status (reference: job-context)
- success
- failure
- cancelled
- Mention
- Notify message to channel members efficiently
- You can specify the condition to mention
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.
- 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
- 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 }}
- Fork this repository
- Pull your repository in local machine
- Update original repository
- Checkout "master" branch based "remotes/origin/master" branch
- Work on "master" branch
- Push you changes to your repository
- Create a new Pull Request