From a207631e2b92ba906b9a7b98a1b63fe64e51c0b5 Mon Sep 17 00:00:00 2001 From: Metin Cakircali Date: Fri, 21 Jun 2024 10:48:43 +0200 Subject: [PATCH] fix(CI): only notify a failure for master/main/develop --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8669a8af8..43b9355d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,10 @@ jobs: if: ${{ always() && !github.event.pull_request.head.repo.fork && (github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci') }} steps: - name: Trigger Teams notification + if: failure() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') uses: ecmwf-actions/notify-teams@v1 with: incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }} needs_context: ${{ toJSON(needs) }} + notify_on: | + failure