From 023496766ec36e32f34784cb405f5d94da9ca765 Mon Sep 17 00:00:00 2001 From: mikolaj-krzyzanowski-f3 Date: Wed, 9 Oct 2024 08:35:47 +0100 Subject: [PATCH] fix: Add a common check to use as a required check --- .github/workflows/ci.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d4d761cce4..df2b3a8f68 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,6 +42,41 @@ jobs: with: images-artifact-name: ${{ needs.build-targets.outputs.images-artifact-name }} + pass: + if: always() + needs: + - changed-files + - unit-test + - integration-test + - e2e-test + name: All Checks Pass + runs-on: ubuntu-20.04 + steps: + - run: | + result="${{ needs.changed-files.result }}" + if [[ ! $result == "success" ]]; then + echo "changed-files has failed" + exit 1 + fi + + result="${{ needs.unit-test.result }}" + if [[ ! $result == "success" || $result == "skipped"]]; then + echo "unit-test has failed" + exit 1 + fi + + result="${{ needs.integration-test.result }}" + if [[ ! $result == "success" || $result == "skipped"]]; then + echo "integration-test has failed" + exit 1 + fi + + result="${{ needs.e2e-test.result }}" + if [[ ! $result == "success" || $result == "skipped"]]; then + echo "e2e-test has failed" + exit 1 + fi + release: runs-on: ubuntu-20.04 needs: [calculate-tag, build-targets]