Skip to content

Commit

Permalink
new: notify slack channel
Browse files Browse the repository at this point in the history
- using alpine:3.16 base image
- using jq as json parser
- doc: CHANGELOG.md available
  • Loading branch information
rainui28 committed Oct 17, 2022
1 parent 2ff0e52 commit 4650bac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- `entrypoint.sh` has been updated according to the new parameters
- `Dockerfile` is using new version of `curlimages/curl:7.84.0`
- `Dockerfile` is using `alpine:3.16` as base image
- `README.md` has been updated and simplified
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This action wraps the Slack [chat.postMessage](https://api.slack.com/methods/cha
- name: Notify Slack
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} # required
uses: rainui28/notify-slack-action@master
uses: rainui28/notify-slack-action@<tag>
with:
channel-id: <slack-channel-id> # required
text: <text-to-post> # required
Expand All @@ -30,6 +30,8 @@ Here's what the Slack message would look like:
| channel-id | x | string | Channel where message will be posted |
| text | x | string | Message to post in the channel |
**You can find available action's tags [here](https://github.com/rainui28/notify-slack-action/tags)**
## References
- [Slack's documentation](https://api.slack.com/docs/messages)
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ if [ $is_ok == 'true' ]
then
echo "* Slack channel id '$1' has been notified with '$2'"
else
log_error "`echo $response | jq '.error'`"
log_error "SLACK_BOT_ERROR: `echo $response | jq '.error'`"
fi
exit 0

0 comments on commit 4650bac

Please sign in to comment.