v1.14.0
botPostMessage.yml / New push to repo (push) Successful in 7s
webhookCustomJSON.yml / New push to repo (push) Successful in 6s

This commit is contained in:
Steve Gill
2021-05-17 14:56:00 -07:00
parent 49cf7c9da9
commit d09f6a279f
10 changed files with 11 additions and 28 deletions
-17
View File
@@ -1,17 +0,0 @@
on: [push]
jobs:
new_push_job:
runs-on: ubuntu-latest
name: New push to repo
steps:
- name: Should Fail
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'CTAAHRA79'
slack-message: 'posting from a github action!'
# Use the output from the `hello` step
- name: Get the output time
run: echo "The time was ${{ steps.hello.outputs.time }}"
+1 -1
View File
@@ -7,7 +7,7 @@ jobs:
steps:
- name: Publish to slack
id: slack
uses: slackapi/[email protected]3.0
uses: slackapi/[email protected]4.0
with:
channel-id: 'CTAAHRA79'
slack-message: 'posting from a github action!'
+1 -1
View File
@@ -7,7 +7,7 @@ jobs:
steps:
- name: Publish to slack
id: slack
uses: slackapi/[email protected]3.0
uses: slackapi/[email protected]4.0
with:
payload: "{\"key\":\"value\",\"foo\":\"bar\"}"
env:
+3 -3
View File
@@ -25,7 +25,7 @@ You need to define expected variables in the payload the webhook will receive. I
```
- name: Send GitHub Action trigger data to Slack workflow
id: slack
uses: slackapi/[email protected]3.0
uses: slackapi/[email protected]4.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
```
@@ -35,7 +35,7 @@ or
```
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]3.0
uses: slackapi/[email protected]4.0
with:
payload: "{\"key\":\"value\",\"foo\":\"bar\"}" # This data can be any valid JSON from a previous step in the GitHub Action
env:
@@ -57,7 +57,7 @@ This route allows
```
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
uses: slackapi/slack-github-action@v1.14.0
with:
channel-id: 'CHANNEL_ID' # Slack channel id to post message
slack-message: 'posting from a github action!'
+1 -1
View File
@@ -16057,7 +16057,7 @@ try {
throw 'Need to provide at least one botToken or webhookUrl'
}
if (botToken.length > 0) {
if (typeof botToken !== 'undefined' && botToken.length > 0) {
const message = core.getInput('slack-message');
const channelId = core.getInput('channel-id');
const web = new WebClient(botToken);
@@ -7,7 +7,7 @@ jobs:
steps:
- name: Publish to slack channel via bot token
id: slack
uses: slackapi/[email protected]3.0
uses: slackapi/[email protected]4.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
@@ -7,7 +7,7 @@ jobs:
steps:
- name: Send GitHub trigger payload to Slack Workflow Builder
id: slack
uses: slackapi/[email protected]3.0
uses: slackapi/[email protected]4.0
with:
payload: "{\"key\":\"value\",\"foo\":\"bar\"}"
env:
@@ -7,6 +7,6 @@ jobs:
steps:
- name: Send GitHub trigger payload to Slack Workflow Builder
id: slack
uses: slackapi/[email protected]3.0
uses: slackapi/[email protected]4.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+1 -1
View File
@@ -13,7 +13,7 @@ try {
throw 'Need to provide at least one botToken or webhookUrl'
}
if (botToken.length > 0) {
if (typeof botToken !== 'undefined' && botToken.length > 0) {
const message = core.getInput('slack-message');
const channelId = core.getInput('channel-id');
const web = new WebClient(botToken);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "slack-github-action",
"version": "1.13.0",
"version": "1.14.0",
"description": "The official slack github action. Use this to send data into your Slack workspace",
"main": "dist/index.js",
"scripts": {