From b4fd8745de849cd4c765858c5dae4ed30ddd3e8e Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 18:03:43 -0400 Subject: [PATCH] Add a job to notify on failure --- .github/workflows/lsst-tests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/lsst-tests.yml b/.github/workflows/lsst-tests.yml index d8e6c492..2acdec92 100644 --- a/.github/workflows/lsst-tests.yml +++ b/.github/workflows/lsst-tests.yml @@ -60,3 +60,18 @@ jobs: with: files: ./coverage.xml fail_ci_if_error: false + + notify-on-failure: + runs-on: ubuntu-latest + if: ${{ always() && (github.event_name == 'push' || github.event_name == 'schedule') && needs.lsst-tests.result == 'failure' }} + needs: + - lsst-tests + steps: + - uses: actions/checkout@v2 + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + MSG_MINIMAL: actions_url + SLACK_FOOTER: "" + SLACK_TITLE: LSST metadetect tests failing on lsst-dev + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}