File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -121,3 +121,23 @@ jobs:
121121 run : |
122122 cd build_system
123123 cargo test
124+
125+
126+ # Summary job for the merge queue.
127+ # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
128+ success :
129+ needs : [build, duplicates, build_system]
130+ # We need to ensure this job does *not* get skipped if its dependencies fail,
131+ # because a skipped job is considered a success by GitHub. So we have to
132+ # overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
133+ # when the workflow is canceled manually.
134+ if : ${{ !cancelled() }}
135+ runs-on : ubuntu-latest
136+ steps :
137+ # Manually check the status of all dependencies. `if: failure()` does not work.
138+ - name : Conclusion
139+ run : |
140+ # Print the dependent jobs to see them in the CI log
141+ jq -C <<< '${{ toJson(needs) }}'
142+ # Check if all jobs that we depend on (in the needs array) were successful.
143+ jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
You can’t perform that action at this time.
0 commit comments