-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (54 loc) · 1.91 KB
/
slack-send-message.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Slack send message
on:
workflow_dispatch:
inputs:
channel-or-user:
description: 'Send a message to a channel or a user (prefer usage of id instead of name).'
# C02J5M4JMK7 is a test channel
# vars.SLACK_CHANNEL_ID_NOTIFICATIONS is the production channel
default: 'C02J5M4JMK7'
type: string
required: true
jobs:
send:
runs-on: ${{ vars.RUNNER_UBUNTU }}
steps:
- name: Send message to Slack
uses: slackapi/[email protected]
with:
channel-id: ${{ github.event.inputs.channel-or-user }}
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":mega: This is a test from the ${{github.repository}} repository",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"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:"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"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:"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}