Skip to content

Commit

Permalink
Adding destroy action notification for slack (#139759)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhitestratiform authored Sep 10, 2024
1 parent e70e079 commit 5ceb795
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,18 @@ jobs:
inputs: '{ "topics": "mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.config,mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.offsets,mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.status"}'
ref: refs/heads/master # Otherwise workflow-dispatch tries to operate off of our default name
- name: Destroy
run: ./run destroy --stage $STAGE_PREFIX$branch_name --verify false
run: ./run destroy --stage $STAGE_PREFIX$branch_name --verify false

# Notify the integrations channel when a destroy action fails
notify_on_destroy_failure:
runs-on: ubuntu-latest
needs:
- destroy
if: ${{ failure() }}
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: ":boom: A destroy action has failed on ${{ github.repository }}."
MSG_MINIMAL: true
SLACK_WEBHOOK: ${{ secrets.INTEGRATIONS_SLACK_WEBHOOK }}

0 comments on commit 5ceb795

Please sign in to comment.