Skip to content

Commit

Permalink
Merge pull request #10 from ykim-akamai/ci/notify_slack_on_release
Browse files Browse the repository at this point in the history
Ci/notify slack on release
  • Loading branch information
ykim-akamai authored Oct 29, 2024
2 parents 9314f0b + f8a92e0 commit d54eca0
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/release-notify-slack.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
name: Notify Dev DX Channel on Release
on:
release:
workflow_dispatch: null
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.SLACK_CHANNEL_ID }}
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.tag_name }} is now live!* :tada:"
"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 }}

- 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": "*<${{ github.event.release.html_url }}| ${{ github.event.release.tag_name }} Release notes }}>*"
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit d54eca0

Please sign in to comment.