File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 50
50
if [[ "${{ github.event.inputs.slackChannel }}" != "" ]]; then
51
51
echo "SLACK_CHANNEL=${{ github.event.inputs.slackChannel }}" >> $GITHUB_ENV
52
52
fi
53
+ if [[ "${{ secrets.SLACK_WEBHOOK }}" != "" ]]; then
54
+ echo "SLACK_WEBHOOK=exists" >> $GITHUB_ENV
55
+ fi
53
56
54
57
- name : Set up Go 1.15.x
55
58
uses : actions/setup-go@v2
@@ -142,7 +145,8 @@ jobs:
142
145
echo 'SLACK_TITLE=Releasability for ${{ github.repository }} @ ${{ env.RELEASE }} is NO-GO!' >> $GITHUB_ENV
143
146
144
147
- name : Post status to Slack
145
- if : ${{ secrets.SLACK_WEBHOOK != '' && steps.exists.outputs.release-branch == 'false' }}
148
+ # Note: using env.SLACK_WEBHOOK here because secrets are not allowed in the if block.
149
+ if : env.SLACK_WEBHOOK != '' && steps.exists.outputs.release-branch == 'false'
146
150
147
151
env :
148
152
SLACK_ICON : http://github.com/knative.png?size=48
You can’t perform that action at this time.
0 commit comments