Skip to content

Commit fc9fb34

Browse files
committed
Auto merge of #150772 - Kobzol:remove-bors-build-finished, r=<try>
Change `bors build finished` job to `publish toolstate`
2 parents db1484b + ca204cc commit fc9fb34

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)