Update common github actions (#413)

Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
knative-automation 2021-01-06 18:17:36 -08:00 committed by GitHub
parent 8415abddad
commit 1ee4750501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -50,6 +50,9 @@ jobs:
if [[ "${{ github.event.inputs.slackChannel }}" != "" ]]; then if [[ "${{ github.event.inputs.slackChannel }}" != "" ]]; then
echo "SLACK_CHANNEL=${{ github.event.inputs.slackChannel }}" >> $GITHUB_ENV echo "SLACK_CHANNEL=${{ github.event.inputs.slackChannel }}" >> $GITHUB_ENV
fi fi
if [[ "${{ secrets.SLACK_WEBHOOK }}" != "" ]]; then
echo "SLACK_WEBHOOK=exists" >> $GITHUB_ENV
fi
- name: Set up Go 1.15.x - name: Set up Go 1.15.x
uses: actions/setup-go@v2 uses: actions/setup-go@v2
@ -142,7 +145,8 @@ jobs:
echo 'SLACK_TITLE=Releasability for ${{ github.repository }} @ ${{ env.RELEASE }} is NO-GO!' >> $GITHUB_ENV echo 'SLACK_TITLE=Releasability for ${{ github.repository }} @ ${{ env.RELEASE }} is NO-GO!' >> $GITHUB_ENV
- name: Post status to Slack - name: Post status to Slack
if: ${{ secrets.SLACK_WEBHOOK != '' && steps.exists.outputs.release-branch == 'false' }} # Note: using env.SLACK_WEBHOOK here because secrets are not allowed in the if block.
if: env.SLACK_WEBHOOK != '' && steps.exists.outputs.release-branch == 'false'
uses: rtCamp/action-slack-notify@v2.1.0 uses: rtCamp/action-slack-notify@v2.1.0
env: env:
SLACK_ICON: http://github.com/knative.png?size=48 SLACK_ICON: http://github.com/knative.png?size=48