Skip to content

Commit 7dacfcf

Browse files
authored
CI: Notify slack channel on releases (linode#469)
* add release-notify-slack workflow * add release-notify-slack workflow * add workflow dispatch * gha test 1 * gha test 2 * gha test 3 * gha test 4 * gha test 5 * fix payload syntax * change environment variable name * update slack payload for gh test * update slack payload to include link to release notes
1 parent 76a2f5b commit 7dacfcf

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Notify Dev DX Channel on Release
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch: null
6+
7+
jobs:
8+
notify:
9+
if: github.repository == 'linode/linode_api4-python'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Notify Slack - Main Message
13+
id: main_message
14+
uses: slackapi/slack-github-action@v1.27.0
15+
with:
16+
channel-id: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
17+
payload: |
18+
{
19+
"blocks": [
20+
{
21+
"type": "section",
22+
"text": {
23+
"type": "mrkdwn",
24+
"text": "*New Release Published: _linode_api4-python_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"
25+
}
26+
}
27+
]
28+
}
29+
env:
30+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 commit comments

Comments
 (0)