From 1e416b19f32e550e0a785e2babfaddc67f7efd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Wei=C3=9Fe?= Date: Mon, 28 Oct 2024 14:35:20 +0100 Subject: [PATCH] ci: only notify teams on first failure --- .github/workflows/e2e.yml | 2 +- .github/workflows/e2e_runtime-reproducibility.yml | 4 ++-- .github/workflows/rpm_updates.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 28c00f2f1..de5983b3c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -85,7 +85,7 @@ jobs: name: e2e_pod_logs-${{ inputs.platform }}-${{ inputs.test-name }} path: workspace/namespace-logs - name: Notify teams channel of failure - if: ${{ failure() && github.event_name == 'schedule' }} + if: ${{ failure() && github.event_name == 'schedule' && github.run_attempt == 1 }} uses: ./.github/actions/post_to_teams with: webhook: ${{ secrets.TEAMS_CI_WEBHOOK }} diff --git a/.github/workflows/e2e_runtime-reproducibility.yml b/.github/workflows/e2e_runtime-reproducibility.yml index 37445c6c0..8a1431829 100644 --- a/.github/workflows/e2e_runtime-reproducibility.yml +++ b/.github/workflows/e2e_runtime-reproducibility.yml @@ -51,7 +51,7 @@ jobs: name: ${{ matrix.build-target }}-${{ matrix.os }}-rebuild path: rebuild - name: Notify teams channel of failure - if: ${{ failure() && github.ref == 'main' }} + if: ${{ failure() && github.ref == 'main' && github.run_attempt == 1 }} uses: ./.github/actions/post_to_teams with: webhook: ${{ secrets.TEAMS_CI_WEBHOOK }} @@ -85,7 +85,7 @@ jobs: print("All checksums were equal") - name: Notify teams channel of failure - if: ${{ failure() && github.ref == 'main' }} + if: ${{ failure() && github.ref == 'main' && github.run_attempt == 1 }} uses: ./.github/actions/post_to_teams with: webhook: ${{ secrets.TEAMS_CI_WEBHOOK }} diff --git a/.github/workflows/rpm_updates.yml b/.github/workflows/rpm_updates.yml index e1a5007bb..4094b6c33 100644 --- a/.github/workflows/rpm_updates.yml +++ b/.github/workflows/rpm_updates.yml @@ -37,7 +37,7 @@ jobs: author: edgelessci token: ${{ secrets.NUNKI_CI_COMMIT_PUSH_PR }} - name: Notify teams channel of failure - if: ${{ failure() && github.ref == 'main' }} + if: ${{ failure() && github.ref == 'main' && github.run_attempt == 1 }} uses: ./.github/actions/post_to_teams with: webhook: ${{ secrets.TEAMS_CI_WEBHOOK }}