v1.14.0
botPostMessage.yml / New push to repo (push) Successful in 7s
webhookCustomJSON.yml / New push to repo (push) Successful in 6s
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:
@@ -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 }}"
|
|
||||||
@@ -7,7 +7,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Publish to slack
|
- name: Publish to slack
|
||||||
id: slack
|
id: slack
|
||||||
uses: slackapi/[email protected]3.0
|
uses: slackapi/[email protected]4.0
|
||||||
with:
|
with:
|
||||||
channel-id: 'CTAAHRA79'
|
channel-id: 'CTAAHRA79'
|
||||||
slack-message: 'posting from a github action!'
|
slack-message: 'posting from a github action!'
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Publish to slack
|
- name: Publish to slack
|
||||||
id: slack
|
id: slack
|
||||||
uses: slackapi/[email protected]3.0
|
uses: slackapi/[email protected]4.0
|
||||||
with:
|
with:
|
||||||
payload: "{\"key\":\"value\",\"foo\":\"bar\"}"
|
payload: "{\"key\":\"value\",\"foo\":\"bar\"}"
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -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
|
- name: Send GitHub Action trigger data to Slack workflow
|
||||||
id: slack
|
id: slack
|
||||||
uses: slackapi/[email protected]3.0
|
uses: slackapi/[email protected]4.0
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
```
|
```
|
||||||
@@ -35,7 +35,7 @@ or
|
|||||||
```
|
```
|
||||||
- name: Send custom JSON data to Slack workflow
|
- name: Send custom JSON data to Slack workflow
|
||||||
id: slack
|
id: slack
|
||||||
uses: slackapi/[email protected]3.0
|
uses: slackapi/[email protected]4.0
|
||||||
with:
|
with:
|
||||||
payload: "{\"key\":\"value\",\"foo\":\"bar\"}" # This data can be any valid JSON from a previous step in the GitHub Action
|
payload: "{\"key\":\"value\",\"foo\":\"bar\"}" # This data can be any valid JSON from a previous step in the GitHub Action
|
||||||
env:
|
env:
|
||||||
@@ -57,7 +57,7 @@ This route allows
|
|||||||
```
|
```
|
||||||
- name: Post to a Slack channel
|
- name: Post to a Slack channel
|
||||||
id: slack
|
id: slack
|
||||||
uses: slackapi/[email protected]
|
uses: slackapi/slack-github-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
channel-id: 'CHANNEL_ID' # Slack channel id to post message
|
channel-id: 'CHANNEL_ID' # Slack channel id to post message
|
||||||
slack-message: 'posting from a github action!'
|
slack-message: 'posting from a github action!'
|
||||||
|
|||||||
Vendored
+1
-1
@@ -16057,7 +16057,7 @@ try {
|
|||||||
throw 'Need to provide at least one botToken or webhookUrl'
|
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 message = core.getInput('slack-message');
|
||||||
const channelId = core.getInput('channel-id');
|
const channelId = core.getInput('channel-id');
|
||||||
const web = new WebClient(botToken);
|
const web = new WebClient(botToken);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Publish to slack channel via bot token
|
- name: Publish to slack channel via bot token
|
||||||
id: slack
|
id: slack
|
||||||
uses: slackapi/[email protected]3.0
|
uses: slackapi/[email protected]4.0
|
||||||
with:
|
with:
|
||||||
channel-id: 'SLACK_CHANNEL_ID' # ID of Slack Channel you want to post to
|
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
|
slack-message: 'posting from a github action!' # The message you want to post
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Send GitHub trigger payload to Slack Workflow Builder
|
- name: Send GitHub trigger payload to Slack Workflow Builder
|
||||||
id: slack
|
id: slack
|
||||||
uses: slackapi/[email protected]3.0
|
uses: slackapi/[email protected]4.0
|
||||||
with:
|
with:
|
||||||
payload: "{\"key\":\"value\",\"foo\":\"bar\"}"
|
payload: "{\"key\":\"value\",\"foo\":\"bar\"}"
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Send GitHub trigger payload to Slack Workflow Builder
|
- name: Send GitHub trigger payload to Slack Workflow Builder
|
||||||
id: slack
|
id: slack
|
||||||
uses: slackapi/[email protected]3.0
|
uses: slackapi/[email protected]4.0
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ try {
|
|||||||
throw 'Need to provide at least one botToken or webhookUrl'
|
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 message = core.getInput('slack-message');
|
||||||
const channelId = core.getInput('channel-id');
|
const channelId = core.getInput('channel-id');
|
||||||
const web = new WebClient(botToken);
|
const web = new WebClient(botToken);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "slack-github-action",
|
"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",
|
"description": "The official slack github action. Use this to send data into your Slack workspace",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user