From ee5e80a8cd6680018fd5f7143d83160b3a90072b Mon Sep 17 00:00:00 2001 From: Razz4780 Date: Thu, 2 Jan 2025 12:20:09 +0100 Subject: [PATCH] create top ci job --- .github/workflows/ci.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c70f741..21c8113 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -80,3 +80,24 @@ jobs: - name: get operator logs if: failure() run: kubectl logs -n mirrord deployment/mirrord-operator + + ci-success: + runs-on: ubuntu-latest + name: ci-success + # We want this to run even if some of the required jobs got skipped + if: always() + needs: + [ + sanity, + operator-install, + operator-install-and-use, + ] + steps: + - name: CI succeeded + # We have to do it in the shell since if it's in the if condition + # then skipping is considered success by branch protection rules + env: + CI_SUCCESS: ${{ (needs.sanity.result == 'success') && + (needs.operator-install.result == 'success') && + (needs.operator-install-and-use.result == 'success') }} + run: echo $CI_SUCCESS && if [ "$CI_SUCCESS" == "true" ]; then echo "SUCCESS" && exit 0; else echo "FAILURE" && exit 1; fi