Skip to content

Commit

Permalink
updated to 1.21.0, fixed update-ts (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengill authored Jul 27, 2022
1 parent 3a35425 commit c1472d4
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 18 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Add this Action as a [step][job-step] to your project's GitHub Action Workflow f
```yaml
- name: Send GitHub Action trigger data to Slack workflow
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
```
Expand All @@ -41,7 +41,7 @@ or
```yaml
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
Expand All @@ -59,7 +59,7 @@ or
```yaml
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
payload-file-path: "./payload-slack-content.json"
env:
Expand All @@ -85,7 +85,7 @@ Add this Action as a [step][job-step] to your project's GitHub Action Workflow f
```yaml
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
Expand All @@ -101,7 +101,7 @@ Using JSON payload for constructing a message is also available:
```yaml
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
Expand Down Expand Up @@ -130,7 +130,7 @@ If you would like to notify the real-time updates on a build status, you can mod

```yaml
- id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
channel-id: "CHANNEL_ID"
payload: |
Expand All @@ -152,7 +152,7 @@ If you would like to notify the real-time updates on a build status, you can mod
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN}}
- uses: slackapi/slack-github-action@v1.20.0
- uses: slackapi/slack-github-action@v1.21.0
with:
channel-id: "CHANNEL_ID"
update-ts: ${{ steps.slack.outputs.ts }}
Expand Down
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ inputs:
payload-file-path: # path to JSON payload to send to Slack via webhook
description: 'path to JSON payload to send to Slack if webhook route. If not supplied, json from GitHub event will be sent instead. If payload is provided, it will take preference over this field'
required: false
update-ts: # The timestamp of a previous message posted to update it instead of posting a new message
description: 'The timestamp of a previous message posted. It will update the existing message instead of posting a new message'
required: false
outputs:
time: # id of output
description: 'The time'
thread_ts: # timestamp on the message that was posted when using bot token
thread_ts: # threaded timestamp on the message that was posted when using bot token
description: 'The timestamp on the message that was posted into Slack when using bot token'
ts: # timestamp of message posted
description: 'The timestamp on the message that was posted into Slack when using bot token'
runs:
using: 'node12'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
steps:
- name: Send GitHub trigger payload to Slack Workflow Builder
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
payload: |
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
steps:
- name: Send GitHub trigger payload to Slack Workflow Builder
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
payload-file-path: "./example-workflows/Technique_1_Slack_Workflow_Builder/payloads/example.json"
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
steps:
- name: Send GitHub trigger payload to Slack Workflow Builder
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
2 changes: 1 addition & 1 deletion example-workflows/Technique_2_Slack_App/JSON_payload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
steps:
- name: Send GitHub trigger payload to Slack Workflow Builder
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
channel-id: 'SLACK_CHANNEL_ID' # ID of Slack Channel you want to post to
payload: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
steps:
- name: Send GitHub trigger payload to Slack Workflow Builder
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
channel-id: 'SLACK_CHANNEL_ID' # ID of Slack Channel you want to post to
payload: "{\"text\": \"posting from a github action\"}"
Expand Down
2 changes: 1 addition & 1 deletion example-workflows/Technique_2_Slack_App/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
steps:
- name: Publish to slack channel via bot token
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
channel-id: 'SLACK_CHANNEL_ID' # ID of Slack Channel you want to post to
slack-message: 'posting from a github action!' # The message you want to post
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
steps:
- name: Send GitHub trigger payload to Slack Workflow Builder
id: slack
uses: slackapi/slack-github-action@v1.20.0
uses: slackapi/slack-github-action@v1.21.0
with:
payload: |
{
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slack-github-action",
"version": "1.20.0",
"version": "1.21.0",
"description": "The official slack github action. Use this to send data into your Slack workspace",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit c1472d4

Please sign in to comment.