Add an emoji reaction to a Slack message
This workflow can be used to react to a Slack message using its message_ts (the unique message ID returned by gha-slack/post).
Please read the prerequisites
The channel_id must be the channel ID, not the name of the Slack channel. You can find this under "channel details" in Slack.
React to a message posted in the same workflow:
Adding a reaction is safe to run more than once. If the message already has the
same reaction (for example after re-running a workflow), Slack returns
already_reacted. The action treats this as success, so the job does not fail.
Real errors (invalid token, missing channel, etc.) still fail
the job.
Supports all emoji's added to Entur's slack organisation, ie:
white_check_mark✅ success / donex❌ failurerocket🚀 deployment / releaseeyes👀 reviewing / taking a looktada🎉 celebrationwarning⚠️ warningthumbsup👍 approval- +++
jobs:
post-message:
uses: entur/gha-slack/.github/workflows/post.yml@v3
with:
channel_id: "CHANNEL_ID"
message: "Deployment started"
secrets: inherit
react-to-message:
needs: post-message
uses: entur/gha-slack/.github/workflows/react.yml@v3
with:
channel_id: "CHANNEL_ID"
message_ts: ${{ needs.post-message.outputs.message_ts }}
emoji: "white_check_mark"
secrets: inherit| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| channel_id | string | true | Slack channel ID where the message was posted |
|
| emoji | string | true | Emoji name to react with (without colons) |
|
| message_ts | string | true | Slack message timestamp (unique message ID) to react to |
|
| timeout_minutes | number | false | 5 |
Job timeout in minutes |
No outputs.