From ea8d855d6734b74b9163de0e3ea1a8afd07c786b Mon Sep 17 00:00:00 2001 From: Saulo Date: Wed, 16 Nov 2022 13:25:46 -0300 Subject: [PATCH 1/3] Change node 12 to node 16 to avoid Github Actions deprecation warnings --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c15c063..ab857a6 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,7 @@ inputs: description: 'need to get commit data' required: false runs: - using: 'node12' + using: 'node16' main: 'dist/index.js' branding: icon: 'bell' From c2c23ea647cea2ba3627038c71b585931f48c610 Mon Sep 17 00:00:00 2001 From: Saulo Date: Fri, 25 Nov 2022 10:55:06 -0300 Subject: [PATCH 2/3] Update readme --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c951c66..2469609 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Rocket.Chat.GitHub.Action.Notification +Forked from ![RocketChat/Rocket.Chat.GitHub.Action.Notification](https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification) +to solve Github Actions warning about node12 deprecation + + ![](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) @@ -40,12 +44,12 @@ Please refer `action.yml` for more details. ```..github/workflows/example1.yml - name: Rocket.Chat Notification - uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master + uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@v1 if: always() with: type: ${{ job.status }} job_name: '*Lint Check*' - mention: 'here' + mention: 'here' #there is an open issue about this config ![issue](https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification/issues/2) mention_if: 'failure' channel: '#random' url: ${{ secrets.ROCKETCHAT_WEBHOOK }} @@ -55,12 +59,12 @@ Please refer `action.yml` for more details. ```..github/workflows/example2.yml - name: Rocket.Chat Notification - uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master + uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@v1 if: always() with: type: ${{ job.status }} job_name: '*Lint Check*' - mention: 'here' + mention: 'here' #there is an open issue about this config ![issue](https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification/issues/2) mention_if: 'failure' channel: '#random' url: ${{ secrets.ROCKETCHAT_WEBHOOK }} From c6f8228db64e0178f3e0e235c3261a6fb5a5fd8c Mon Sep 17 00:00:00 2001 From: Saulo Date: Wed, 27 Mar 2024 18:14:30 -0300 Subject: [PATCH 3/3] node 16 to 20 --- README.md | 75 +++--------------------------------------------------- action.yml | 2 +- 2 files changed, 5 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index 2469609..11873ff 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,15 @@ # Rocket.Chat.GitHub.Action.Notification Forked from ![RocketChat/Rocket.Chat.GitHub.Action.Notification](https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification) -to solve Github Actions warning about node12 deprecation +to solve Github Actions warning about node12 (and 16 too) deprecation. +Read details about use of this action in the original repository. -![](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@v1 - if: always() - with: - type: ${{ job.status }} - job_name: '*Lint Check*' - mention: 'here' #there is an open issue about this config ![issue](https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification/issues/2) - mention_if: 'failure' - channel: '#random' - url: ${{ secrets.ROCKETCHAT_WEBHOOK }} +How to use this action from this repository ``` - -↓ Including the latest commit data - -```..github/workflows/example2.yml - name: Rocket.Chat Notification - uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@v1 + uses: madalozzo/Rocket.Chat.GitHub.Action.Notification@v2 if: always() with: type: ${{ job.status }} @@ -71,20 +21,3 @@ Please refer `action.yml` for more details. commit: true token: ${{ secrets.GITHUB_TOKEN }} ``` - -# Rocket.Chat UI Example - -Notification Preview - -# 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) diff --git a/action.yml b/action.yml index ab857a6..05c69b8 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,7 @@ inputs: description: 'need to get commit data' required: false runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' branding: icon: 'bell'