Skip to content

Commit 3a6a239

Browse files
authored
Merge pull request #149 from salesforcecli/ew/did-not-publish
@W-21263659: Announce to Slack if Github release was skipped
2 parents faf1269 + 5c17ee9 commit 3a6a239

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/create-github-release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,34 @@ jobs:
103103
prerelease: ${{ steps.prereleaseTag.outputs.tag && 'true' || 'false' }}
104104
token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
105105
skipIfReleaseExists: true
106+
107+
- name: Announce if Github Release was skipped
108+
id: slack
109+
if: ${{ steps.changelog.outputs.skipped == 'true' }}
110+
uses: slackapi/slack-github-action@v1.26.0
111+
env:
112+
# for non-CLI-team-owned plugins, you can send this anywhere you like
113+
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
114+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
115+
with:
116+
# Payload can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D
117+
# Only copy over the "blocks" array to the Block Kit Builder
118+
payload: |
119+
{
120+
"blocks": [
121+
{
122+
"type": "header",
123+
"text": {
124+
"type": "plain_text",
125+
"text": ":uno-skip-red: Github Release was skipped in ${{ github.repository }}! :uno-skip-red:"
126+
}
127+
},
128+
{
129+
"type": "section",
130+
"text": {
131+
"type": "mrkdwn",
132+
"text": "*Repo:* ${{ github.server_url }}/${{ github.repository }}\n*Workflow name:* `${{ github.workflow }}`\n*Run url:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
133+
}
134+
}
135+
]
136+
}

0 commit comments

Comments
 (0)