47
47
runs-on : ubuntu-latest
48
48
outputs :
49
49
jobs : ${{ steps.jobs.outputs.jobs }}
50
+ run_type : ${{ steps.jobs.outputs.run_type }}
50
51
steps :
51
52
- name : Checkout the source code
52
53
uses : actions/checkout@v4
@@ -116,7 +117,7 @@ jobs:
116
117
run : echo "[CI_PR_NUMBER=$num]"
117
118
env :
118
119
num : ${{ github.event.number }}
119
- if : github.event_name == 'pull_request '
120
+ if : needs.calculate_matrix.outputs.run_type == 'pr '
120
121
121
122
- name : add extra environment variables
122
123
run : src/ci/scripts/setup-environment.sh
@@ -226,9 +227,9 @@ jobs:
226
227
outcome :
227
228
name : bors build finished
228
229
runs-on : ubuntu-latest
229
- needs : [ job ]
230
+ needs : [ calculate_matrix, job ]
230
231
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
231
- if : " !cancelled() && github.event_name == 'push' "
232
+ if : ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
232
233
steps :
233
234
- name : checkout the source code
234
235
uses : actions/checkout@v4
@@ -243,6 +244,6 @@ jobs:
243
244
- name : publish toolstate
244
245
run : src/ci/publish_toolstate.sh
245
246
shell : bash
246
- if : github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust '
247
+ if : needs.calculate_matrix.outputs.run_type == 'auto '
247
248
env :
248
249
TOOLSTATE_REPO_ACCESS_TOKEN : ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
0 commit comments