Skip to content

Commit

Permalink
chore: Update README to illustrate how to pass thread_ts within payload
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudRinquin committed Apr 26, 2024
1 parent 5b0c19a commit 5559469
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,22 @@ Please note that **the reply message step does not accept a channel name.** Set
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
```

Alternatively, the `thread_ts` value can be passed directly in the payload as illustrated below:

```yaml
# after having sent a message...
- uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: "CHANNEL_ID"
payload: |
{
"thread_ts": "${{ steps.slack.outputs.ts }}"
"text": "Deployment finished (Completed)",
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
```

### Technique 3: Slack Incoming Webhook

This approach allows your GitHub Actions job to post a message to a Slack channel or direct message by utilizing [Incoming Webhooks](https://api.slack.com/messaging/webhooks).
Expand Down

0 comments on commit 5559469

Please sign in to comment.