From fd233fa27f50076ee072bbcb31d3fc1bb36bfffa Mon Sep 17 00:00:00 2001 From: Opeyemi Date: Wed, 6 Mar 2024 13:58:41 +0100 Subject: [PATCH] Update Failure Job (#3055) --- .github/workflows/build.yml | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0315e67f3..63df3c7b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -762,27 +762,11 @@ jobs: steps: - name: Check if any job failed if: | - (github.ref == 'refs/heads/main') - || (github.ref == 'refs/heads/rc') - || (github.ref == 'refs/heads/hotfix-rc') - env: - CLOC_STATUS: ${{ needs.cloc.result }} - ANDROID_STATUS: ${{ needs.android.result }} - F_DROID_STATUS: ${{ needs.f-droid.result }} - IOS_STATUS: ${{ needs.ios.result }} - CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }} - run: | - if [ "$CLOC_STATUS" = "failure" ]; then - exit 1 - elif [ "$ANDROID_STATUS" = "failure" ]; then - exit 1 - elif [ "$F_DROID_STATUS" = "failure" ]; then - exit 1 - elif [ "$IOS_STATUS" = "failure" ]; then - exit 1 - elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then - exit 1 - fi + (github.ref == 'refs/heads/main' + || github.ref == 'refs/heads/rc' + || github.ref == 'refs/heads/hotfix-rc') + && contains(needs.*.result, 'failure') + run: exit 1 - name: Login to Azure - CI Subscription uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0