Skip to content

Commit

Permalink
Mute slack notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
minikin committed Nov 6, 2022
1 parent e1a830d commit 6521788
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,31 +341,31 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: hub release delete ${{ needs.create_release.outputs.tag }}

send_slack_notification:
name: Notify the team Slack channel about this release
needs: [create_release, publish_release]
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- name: Produce action-slack-notify variables
run: |
status="${{ needs.publish_release.outputs.status }}"
release="${{ needs.create_release.outputs.tag }}"
if [ "$status" == "success" ]; then
SLACK_STATUS="success"
SLACK_MESSAGE=":rocket: Published release $release."
else
SLACK_STATUS="failure"
SLACK_MESSAGE=":x: Release $release *FAILED*."
fi
cat <<EOF >> $GITHUB_ENV
SLACK_STATUS=$SLACK_STATUS
SLACK_MESSAGE=$SLACK_MESSAGE
EOF
- name: Send notification
uses: eugene-babichenko/slack-notifier@v1
with:
webhook: ${{ secrets.SLACK_WEBHOOK }}
status: ${{ env.SLACK_STATUS }}
text: ${{ env.SLACK_MESSAGE }}
# send_slack_notification:
# name: Notify the team Slack channel about this release
# needs: [create_release, publish_release]
# runs-on: ubuntu-latest
# if: ${{ always() }}
# steps:
# - name: Produce action-slack-notify variables
# run: |
# status="${{ needs.publish_release.outputs.status }}"
# release="${{ needs.create_release.outputs.tag }}"
# if [ "$status" == "success" ]; then
# SLACK_STATUS="success"
# SLACK_MESSAGE=":rocket: Published release $release."
# else
# SLACK_STATUS="failure"
# SLACK_MESSAGE=":x: Release $release *FAILED*."
# fi
# cat <<EOF >> $GITHUB_ENV
# SLACK_STATUS=$SLACK_STATUS
# SLACK_MESSAGE=$SLACK_MESSAGE
# EOF

# - name: Send notification
# uses: eugene-babichenko/slack-notifier@v1
# with:
# webhook: ${{ secrets.SLACK_WEBHOOK }}
# status: ${{ env.SLACK_STATUS }}
# text: ${{ env.SLACK_MESSAGE }}

0 comments on commit 6521788

Please sign in to comment.