Skip to content

Commit 6581624

Browse files
chore(gha): bump slackapi/slack-github-action from 1.27.0 to 2.0.0 (#386)
1 parent d515daf commit 6581624

File tree

1 file changed

+24
-36
lines changed

1 file changed

+24
-36
lines changed

.github/workflows/slack-send-message.yml

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,31 @@ on:
1313
jobs:
1414
send:
1515
runs-on: ${{ vars.RUNNER_UBUNTU }}
16+
env:
17+
SLACK_CHANNEL: ${{ inputs.channel-or-user }} # sanitize user inputs
1618
steps:
1719
- name: Send message to Slack
18-
uses: slackapi/slack-github-action@v1.27.0
20+
uses: slackapi/slack-github-action@v2.0.0
1921
with:
20-
channel-id: ${{ github.event.inputs.channel-or-user }}
22+
errors: true
23+
method: chat.postMessage
24+
token: ${{ secrets.SLACK_BOT_TOKEN }}
2125
payload: |
22-
{
23-
"blocks": [
24-
{
25-
"type": "header",
26-
"text": {
27-
"type": "plain_text",
28-
"text": ":mega: This is a test from the ${{github.repository}} repository",
29-
"emoji": true
30-
}
31-
},
32-
{
33-
"type": "divider"
34-
},
35-
{
36-
"type": "section",
37-
"text": {
38-
"type": "mrkdwn",
39-
"text": "- available <https://github.com/${{github.repository}}/releases|Releases> :heavy_check_mark: \n - Check packages published on <https://www.npmjs.com/package/bpmn-visualization|NPM> :heavy_check_mark:"
40-
}
41-
},
42-
{
43-
"type": "divider"
44-
},
45-
{
46-
"type": "section",
47-
"text": {
48-
"type": "mrkdwn",
49-
"text": "See the next steps <https://github.com/${{github.repository}}/blob/master/docs/contributors/maintainers.md#github-issues-milestones-and-projects-update|here> :arrow_left:"
50-
}
51-
}
52-
]
53-
}
54-
env:
55-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
26+
channel: ${{ env.SLACK_CHANNEL }}
27+
text: "This is a test from the ${{github.repository}} repository"
28+
blocks:
29+
- type: "header"
30+
text:
31+
type: "plain_text"
32+
text: ":mega: This is a test from the ${{github.repository}} repository"
33+
emoji: true
34+
- type: "divider"
35+
- type: "section"
36+
text:
37+
type: "mrkdwn"
38+
text: "- available <https://github.com/${{github.repository}}/releases|Releases> :heavy_check_mark: \n - Check packages published on <https://www.npmjs.com/package/bpmn-visualization|NPM> :heavy_check_mark:"
39+
- type: "divider"
40+
- type: "section"
41+
text:
42+
type: "mrkdwn"
43+
text: "See the next steps <https://github.com/${{github.repository}}/blob/master/docs/contributors/maintainers.md#github-issues-milestones-and-projects-update|here> :arrow_left:"

0 commit comments

Comments
 (0)