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