Skip to content

Commit 1718bb2

Browse files
KobzolMark-Simulacrum
authored andcommitted
Add bors environment to CI
This will be used to access secrets once we move off rust-lang-ci.
1 parent 53458c8 commit 1718bb2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ jobs:
7373
needs: [ calculate_matrix ]
7474
runs-on: "${{ matrix.os }}"
7575
timeout-minutes: 360
76+
# The bors environment contains secrets required for elevated workflows (try and auto builds),
77+
# which need to access e.g. S3 and upload artifacts. We want to provide access to that
78+
# environment only on the try/auto branches, which are only accessible to bors.
79+
# This also ensures that PR CI (which doesn't get write access to S3) works, as it cannot
80+
# access the environment.
81+
#
82+
# We only enable the environment for the rust-lang/rust repository, so that rust-lang-ci/rust
83+
# CI works until we migrate off it (since that repository doesn't contain the environment).
84+
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/auto')) && 'bors') || '' }}
7685
env:
7786
CI_JOB_NAME: ${{ matrix.name }}
7887
CI_JOB_DOC_URL: ${{ matrix.doc_url }}

0 commit comments

Comments
 (0)