From 5ceb7951eafe6753671fd976e10b73f64ca1ee3f Mon Sep 17 00:00:00 2001 From: dwhitestratiform <52459927+dwhitestratiform@users.noreply.github.com> Date: Tue, 10 Sep 2024 07:52:13 -0400 Subject: [PATCH] Adding destroy action notification for slack (#139759) --- .github/workflows/destroy.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/destroy.yml b/.github/workflows/destroy.yml index e1033651b..0a96661ec 100644 --- a/.github/workflows/destroy.yml +++ b/.github/workflows/destroy.yml @@ -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 \ No newline at end of file + 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 }} \ No newline at end of file