From 6cbe53e054cda41e57f67af5487a1d08e0563f1a Mon Sep 17 00:00:00 2001 From: Bella Luz Quintero Date: Fri, 10 Jan 2025 10:25:40 -0700 Subject: [PATCH] add step to notify slack on failure for submit workflow Co-authored-by: basiliskus <541149+basiliskus@users.noreply.github.com> Co-authored-by: saquino0827 Co-authored-by: Sylvie --- .github/workflows/automated-staging-test-submit.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/automated-staging-test-submit.yml b/.github/workflows/automated-staging-test-submit.yml index 5f1353204..00b4628fb 100644 --- a/.github/workflows/automated-staging-test-submit.yml +++ b/.github/workflows/automated-staging-test-submit.yml @@ -57,10 +57,20 @@ jobs: if [ response != "Received" ] then; echo "File did not send" - exit 0 + exit 1 fi done + - name: Send slack notification on test failure + if: failure() + uses: slackapi/slack-github-action@v2.0.0 + with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook + payload: | + text: "Submit Staging RS Integration Test Failed!: https://github.com/CDCgov/trusted-intermediary/actions/runs/${{ github.run_id }}" + + - name: Clean up private key if: always() run: |