From 040ee1ace8ddb5cd573b888272ac7998c24935d7 Mon Sep 17 00:00:00 2001 From: Misha Sakhnov Date: Wed, 12 Feb 2025 14:09:31 +0200 Subject: [PATCH] ci: add conclusion job for protection rules (#1256) Co-authored-by: Alexander Bayandin --- .github/workflows/e2e-test.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/e2e-test.yaml b/.github/workflows/e2e-test.yaml index 5ab749e48..7674e3827 100644 --- a/.github/workflows/e2e-test.yaml +++ b/.github/workflows/e2e-test.yaml @@ -268,3 +268,18 @@ jobs: - name: Cleanup if: always() run: make ${{ matrix.cluster }}-destroy + + # This job simplifies setting branch protection rules (in GitHub UI) + # by allowing to set only this job instead of listing many others. + # It also makes it easier to rename or parametrise jobs (using matrix) + # which requires changes in branch protection rules + conclusion: + name: Conclusion + needs: [ e2e-tests ] + if: always() + runs-on: ubuntu-22.04 + steps: + - name: Fail the job if any of the dependencies do not succeed or are skipped + run: exit 1 + if: | + contains(needs.*.result, 'failed') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')