Skip to content

Commit

Permalink
Merge pull request #144 from mochetts/patch-1
Browse files Browse the repository at this point in the history
Update README to include other `SLACK_COLOR` valid values
  • Loading branch information
L0RD-ZER0 committed Mar 11, 2024
2 parents 88f64c6 + bec297c commit 5addcdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -48,7 +48,7 @@ SLACK_USERNAME | `rtBot` | C
SLACK_MSG_AUTHOR | `$GITHUB_ACTOR` (The person who triggered action). | GitHub username of the person who has triggered the action. In case you want to modify it, please specify corrent GitHub username.
SLACK_ICON | ![rtBot Avatar](https://github.com/rtBot.png?size=32) | User/Bot icon shown with Slack message. It uses the URL supplied to this env variable to display the icon in slack message.
SLACK_ICON_EMOJI | - | User/Bot icon shown with Slack message, in case you do not wish to add a URL for slack icon as above, you can set slack emoji in this env variable. Example value: `:bell:` or any other valid slack emoji.
SLACK_COLOR | `good` (green) | You can pass `${{ job.status }}` for automatic coloring or an RGB value like `#efefef` which would change color on left side vertical line of Slack message.
SLACK_COLOR | `good` (green) | You can pass `${{ job.status }}` for automatic coloring or an RGB value like `#efefef` which would change color on left side vertical line of Slack message. Other valid values for this field are: `success`, `cancelled` or `failure`.
SLACK_LINK_NAMES | - | If set to `true`, enable mention in Slack message.
SLACK_MESSAGE | Generated from git commit message. | The main Slack message in attachment. It is advised not to override this.
SLACK_TITLE | Message | Title to use before main Slack message.
Expand All @@ -61,6 +61,7 @@ SLACK_ON_FAILURE | - | I
SLACK_ON_CANCEL | - | If set, will send the provided message instead of the default message when the passed status (through ``SLACK_COLOR``) is `cancelled`.
SLACK_CUSTOM_PAYLOAD | - | If you want to send a custom payload to slack, you can pass it as a string to this variable. This will override all other variables and send the custom payload to slack. Example: `SLACK_CUSTOM_PAYLOAD: '{"text": "Hello, World!"}'`, Note: This payload should be in JSON format, and is not validated by the action.


You can see the action block with all variables as below:

```yml
Expand Down

0 comments on commit 5addcdf

Please sign in to comment.