@@ -306,30 +306,22 @@ jobs:
306306 DD_GITHUB_JOB_NAME : ${{ matrix.full_name }}
307307 run : ./build/citool/debug/citool upload-build-metrics build/cpu-usage.csv
308308
309- # This job isused to tell bors the final status of the build, as there is no practical way to detect
310- # when a workflow is successful listening to webhooks only in our current bors implementation (homu).
309+ # This job is used to publish toolstate for successful auto builds.
311310 outcome :
312- name : bors build finished
311+ name : publish toolstate
313312 runs-on : ubuntu-24.04
314313 needs : [ calculate_matrix, job ]
315- # !cancelled() executes the job regardless of whether the previous jobs passed or failed
316- if : ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
317- environment : ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto' || github.ref == 'refs/heads/automation/bors/auto')) && 'bors') || '' }}
314+ if : ${{ needs.calculate_matrix.outputs.run_type == 'auto' }}
315+ environment : ${{ (github.repository == 'rust-lang/rust' && 'bors') || '' }}
318316 steps :
319317 - name : checkout the source code
320318 uses : actions/checkout@v5
321319 with :
322320 fetch-depth : 2
323- # Calculate the exit status of the whole CI workflow.
324- # If all dependent jobs were successful, this exits with 0 (and the outcome job continues successfully).
325- # If a some dependent job has failed, this exits with 1.
326- - name : calculate the correct exit status
327- run : jq --exit-status 'all(.result == "success" or .result == "skipped")' <<< '${{ toJson(needs) }}'
328321 # Publish the toolstate if an auto build succeeds (just before push to the default branch)
329322 - name : publish toolstate
330323 run : src/ci/publish_toolstate.sh
331324 shell : bash
332- if : needs.calculate_matrix.outputs.run_type == 'auto'
333325 env :
334326 TOOLSTATE_ISSUES_API_URL : https://api.github.com/repos/rust-lang/rust/issues
335327 TOOLSTATE_PUBLISH : 1
0 commit comments