-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Notify slack channel on releases (#614)
* notify slack channel release-notify-slack.yml * add condition to not run on forks * add condition to not run on forks * fix indentation
- Loading branch information
1 parent
2459ed2
commit 59c3e61
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Notify Dev DX Channel on Release | ||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: null | ||
|
||
jobs: | ||
notify: | ||
if: github.repository == 'linode/ansible_linode' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify Slack - Main Message | ||
id: main_message | ||
uses: slackapi/slack-github-action@v1.27.0 | ||
with: | ||
channel-id: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }} | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*New Release Published: _ansible_linode_ - ${{ 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/slack-github-action@v1.27.0 | ||
with: | ||
channel-id: ${{ secrets.DEV_DX_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 }} |