Slack send message #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |