From f7361cfd428e6f4036a2ef5f77fa71b75a372923 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Thu, 8 Aug 2024 15:01:47 -0700 Subject: [PATCH] notify slack if deploy action fails --- .github/workflows/deploy.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9b250918d..d7fa127e9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -92,4 +92,12 @@ jobs: user_email: 41898282+github-actions[bot]@users.noreply.github.com cname: docs.defang.io - + - name: Notify Slack of Action Failures + uses: ravsamhq/notify-slack-action@2.5.0 + if: ${{ always() && github.ref_name == 'main' }} + with: + status: ${{ job.status }} + notify_when: "failure" + notification_title: "{workflow} is failing" + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFIER_WEBHOOK_URL }}