diff --git a/.github/workflows/e2e-ci.yml b/.github/workflows/e2e-ci.yml index 088d4b73..3ba1fbf9 100644 --- a/.github/workflows/e2e-ci.yml +++ b/.github/workflows/e2e-ci.yml @@ -45,17 +45,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 1 if: always() - needs: [e2e] - env: - FAILURE: ${{ contains(join(needs.*.result, ','), 'failure') }} - CANCELLED: ${{ contains(join(needs.*.result, ','), 'cancelled') }} + needs: + - e2e steps: - - name: Check for failure or cancelled jobs result - shell: bash - run: | - echo "Failure: $FAILURE - Cancelled: $CANCELLED" - if [ "$FAILURE" = "false" ] && [ "$CANCELLED" = "false" ]; then - exit 0 - else - exit 1 - fi + - name: Exit with error if some jobs are not successful + run: exit 1 + if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) }} diff --git a/.github/workflows/repo-root-ci.yml b/.github/workflows/repo-root-ci.yml index 8607a495..be53474d 100644 --- a/.github/workflows/repo-root-ci.yml +++ b/.github/workflows/repo-root-ci.yml @@ -35,17 +35,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 1 if: always() - needs: [format] - env: - FAILURE: ${{ contains(join(needs.*.result, ','), 'failure') }} - CANCELLED: ${{ contains(join(needs.*.result, ','), 'cancelled') }} + needs: + - format steps: - - name: Check for failure or cancelled jobs result - shell: bash - run: | - echo "Failure: $FAILURE - Cancelled: $CANCELLED" - if [ "$FAILURE" = "false" ] && [ "$CANCELLED" = "false" ]; then - exit 0 - else - exit 1 - fi + - name: Exit with error if some jobs are not successful + run: exit 1 + if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) }} diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 809d7ce0..32502dfa 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -70,17 +70,10 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 1 if: always() - needs: [build_and_test, lint_and_fmt] - env: - FAILURE: ${{ contains(join(needs.*.result, ','), 'failure') }} - CANCELLED: ${{ contains(join(needs.*.result, ','), 'cancelled') }} + needs: + - build_and_test + - lint_and_fmt steps: - - name: Check for failure or cancelled jobs result - shell: bash - run: | - echo "Failure: $FAILURE - Cancelled: $CANCELLED" - if [ "$FAILURE" = "false" ] && [ "$CANCELLED" = "false" ]; then - exit 0 - else - exit 1 - fi + - name: Exit with error if some jobs are not successful + run: exit 1 + if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) }} diff --git a/.github/workflows/typescript-ci.yml b/.github/workflows/typescript-ci.yml index b9d33b06..b6307a2c 100644 --- a/.github/workflows/typescript-ci.yml +++ b/.github/workflows/typescript-ci.yml @@ -64,17 +64,10 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 1 if: always() - needs: [build_and_test, lint_and_fmt] - env: - FAILURE: ${{ contains(join(needs.*.result, ','), 'failure') }} - CANCELLED: ${{ contains(join(needs.*.result, ','), 'cancelled') }} + needs: + - build_and_test + - lint_and_fmt steps: - - name: Check for failure or cancelled jobs result - shell: bash - run: | - echo "Failure: $FAILURE - Cancelled: $CANCELLED" - if [ "$FAILURE" = "false" ] && [ "$CANCELLED" = "false" ]; then - exit 0 - else - exit 1 - fi + - name: Exit with error if some jobs are not successful + run: exit 1 + if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) }}