Skip to content

Commit

Permalink
CI: Notify slack channel on releases (#469)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ykim-akamai authored Oct 31, 2024
1 parent 76a2f5b commit 7dacfcf
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release-notify-slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Notify Dev DX Channel on Release
on:
release:
types: [published]
workflow_dispatch: null

jobs:
notify:
if: github.repository == 'linode/linode_api4-python'
runs-on: ubuntu-latest
steps:
- name: Notify Slack - Main Message
id: main_message
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*New Release Published: _linode_api4-python_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit 7dacfcf

Please sign in to comment.