Skip to content

Commit bbf4ec3

Browse files
committed
Add support for automation/bors/auto merge branch
1 parent 75f53dd commit bbf4ec3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- try
1616
- try-perf
1717
- automation/bors/try
18+
- automation/bors/auto
1819
pull_request:
1920
branches:
2021
- "**"
@@ -56,7 +57,7 @@ jobs:
5657
- name: Test citool
5758
# Only test citool on the auto branch, to reduce latency of the calculate matrix job
5859
# on PR/try builds.
59-
if: ${{ github.ref == 'refs/heads/auto' }}
60+
if: ${{ github.ref == 'refs/heads/auto' || github.ref == 'refs/heads/automation/bors/auto' }}
6061
run: |
6162
cd src/ci/citool
6263
CARGO_INCREMENTAL=0 cargo test
@@ -79,7 +80,7 @@ jobs:
7980
# access the environment.
8081
#
8182
# We only enable the environment for the rust-lang/rust repository, so that CI works on forks.
82-
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')) && 'bors') || '' }}
83+
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') || '' }}
8384
env:
8485
CI_JOB_NAME: ${{ matrix.name }}
8586
CI_JOB_DOC_URL: ${{ matrix.doc_url }}
@@ -313,7 +314,7 @@ jobs:
313314
needs: [ calculate_matrix, job ]
314315
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
315316
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
316-
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')) && 'bors') || '' }}
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') || '' }}
317318
steps:
318319
- name: checkout the source code
319320
uses: actions/checkout@v5

‎src/ci/citool/src/main.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ impl GitHubContext {
4646
let patterns = if !patterns.is_empty() { Some(patterns) } else { None };
4747
Some(RunType::TryJob { job_patterns: patterns })
4848
}
49-
("push", "refs/heads/auto") => Some(RunType::AutoJob),
49+
("push", "refs/heads/auto" | "refs/heads/automation/bors/auto") => {
50+
Some(RunType::AutoJob)
51+
}
5052
("push", "refs/heads/main") => Some(RunType::MainJob),
5153
_ => None,
5254
}

0 commit comments

Comments
 (0)