diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-01-27 23:27:43 +0100 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-01-27 23:27:43 +0100 |
| commit | bc6b9bf526b2aafefe5d212cdde85e01b16351ba (patch) | |
| tree | 2b4dd03b094453238f1cc5356ec923872c169c1a | |
| parent | 9f33f846ddc06afd7ffd839ee4f18babac3f3204 (diff) | |
| download | rust-bc6b9bf526b2aafefe5d212cdde85e01b16351ba.tar.gz rust-bc6b9bf526b2aafefe5d212cdde85e01b16351ba.zip | |
Add CI success job
| -rw-r--r-- | .github/workflows/ci.yml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f96912e6b7a..689a7dee435 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,3 +121,23 @@ jobs: run: | cd build_system cargo test + + + # Summary job for the merge queue. + # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB! + success: + needs: [build, duplicates, build_system] + # We need to ensure this job does *not* get skipped if its dependencies fail, + # because a skipped job is considered a success by GitHub. So we have to + # overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run + # when the workflow is canceled manually. + if: ${{ !cancelled() }} + runs-on: ubuntu-latest + steps: + # Manually check the status of all dependencies. `if: failure()` does not work. + - name: Conclusion + run: | + # Print the dependent jobs to see them in the CI log + jq -C <<< '${{ toJson(needs) }}' + # Check if all jobs that we depend on (in the needs array) were successful. + jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' |
