Skip to content

Commit a5fe0a3

Browse files
committed
chore: check for slack webhook
1 parent 9148796 commit a5fe0a3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,18 @@ jobs:
106106
token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
107107
skipIfReleaseExists: true
108108

109+
- name: Check for Slack webhook
110+
id: check-slack
111+
run: |
112+
if [ -n "$SLACK_WEBHOOK" ]; then
113+
echo "has_webhook=true" >> "$GITHUB_OUTPUT"
114+
fi
115+
env:
116+
SLACK_WEBHOOK: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
117+
109118
- name: Announce if Github Release was skipped
110119
id: slack
111-
if: ${{ steps.changelog.outputs.skipped == 'true' && github.actor != 'dependabot[bot]' && secrets.CLI_ALERTS_SLACK_WEBHOOK != '' }}
120+
if: ${{ steps.changelog.outputs.skipped == 'true' && github.actor != 'dependabot[bot]' && steps.check-slack.outputs.has_webhook == 'true' }}
112121
uses: slackapi/slack-github-action@v1.26.0
113122
env:
114123
# for non-CLI-team-owned plugins, you can send this anywhere you like

0 commit comments

Comments
 (0)