forked from linode/linode_api4-python
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.25 KB
/
release-notify-slack.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
name: Notify Dev DX Channel on Release
on:
release:
workflow_dispatch: null
types: [published]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Slack - Main Message
id: main_message
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "New Release Published: *<${{ github.event.release.html_url }}|${{ github.repository }} - ${{ github.event.release.tag_name }}>* is now live! :tada:"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Notify Slack - Threaded Release Notes
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
{
"thread_ts": "${{ steps.main_message.outputs.ts }}",
"text": "Release Notes:\n${{ toJSON(github.event.release.body) }}"
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}