From 3cff4e83ba456324de37d794ac6c269d0099fecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Wed, 24 Jan 2024 12:54:50 +0100 Subject: [PATCH] CI: add a success conclusion job --- .github/workflows/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 56d11ae211..e1c765e995 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -225,3 +225,20 @@ jobs: - name: Install Rust run: rustup update nightly && rustup default nightly - run: ./ci/build-std-detect.sh + + success: + needs: + - docs + - verify + - env_override + - test + - build-std-detect + runs-on: ubuntu-latest + # GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency + # failed" as success. So we have to do some contortions to ensure the job fails if any of its + # dependencies fails. + if: always() # make sure this is never "skipped" + steps: + # Manually check the status of all dependencies. `if: failure()` does not work. + - name: check if any dependency failed + run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'