Skip to content

Commit 89339df

Browse files
committed
ci: run the "bors build finished" jobs only during try and auto runs
1 parent ba97ad3 commit 89339df

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ jobs:
746746
try-success:
747747
needs:
748748
- try
749-
if: success()
749+
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
750750
steps:
751751
- name: mark the job as a success
752752
run: exit 0
@@ -755,7 +755,7 @@ jobs:
755755
try-failure:
756756
needs:
757757
- try
758-
if: "!success()"
758+
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
759759
steps:
760760
- name: mark the job as a failure
761761
run: exit 1
@@ -764,7 +764,7 @@ jobs:
764764
auto-success:
765765
needs:
766766
- auto
767-
if: success()
767+
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
768768
steps:
769769
- name: mark the job as a success
770770
run: exit 0
@@ -773,7 +773,7 @@ jobs:
773773
auto-failure:
774774
needs:
775775
- auto
776-
if: "!success()"
776+
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
777777
steps:
778778
- name: mark the job as a failure
779779
run: exit 1

src/ci/github-actions/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,12 @@ x--expand-yaml-anchors--remove:
221221
runs-on: ubuntu-latest
222222

223223
- &base-success-job
224-
if: success()
225224
steps:
226225
- name: mark the job as a success
227226
run: exit 0
228227
<<: *base-outcome-job
229228

230229
- &base-failure-job
231-
if: "!success()"
232230
steps:
233231
- name: mark the job as a failure
234232
run: exit 1
@@ -695,13 +693,17 @@ jobs:
695693
# successful listening to webhooks only.
696694
try-success:
697695
needs: [try]
696+
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
698697
<<: *base-success-job
699698
try-failure:
700699
needs: [try]
700+
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
701701
<<: *base-failure-job
702702
auto-success:
703703
needs: [auto]
704+
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
704705
<<: *base-success-job
705706
auto-failure:
706707
needs: [auto]
708+
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
707709
<<: *base-failure-job

0 commit comments

Comments
 (0)