Skip to content

Commit 51c72e2

Browse files
Update common github actions (#1981)
Signed-off-by: Knative Automation <[email protected]>
1 parent 0ef9bd9 commit 51c72e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/knative-releasability.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ jobs:
5050
if [[ "${{ github.event.inputs.slackChannel }}" != "" ]]; then
5151
echo "SLACK_CHANNEL=${{ github.event.inputs.slackChannel }}" >> $GITHUB_ENV
5252
fi
53+
if [[ "${{ secrets.SLACK_WEBHOOK }}" != "" ]]; then
54+
echo "SLACK_WEBHOOK=exists" >> $GITHUB_ENV
55+
fi
5356
5457
- name: Set up Go 1.15.x
5558
uses: actions/setup-go@v2
@@ -142,7 +145,8 @@ jobs:
142145
echo 'SLACK_TITLE=Releasability for ${{ github.repository }} @ ${{ env.RELEASE }} is NO-GO!' >> $GITHUB_ENV
143146
144147
- 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'
146150
uses: rtCamp/[email protected]
147151
env:
148152
SLACK_ICON: http://github.com/knative.png?size=48

0 commit comments

Comments
 (0)