From be50413ef00fde789e185352e3f8bf109d0f2a99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= <berykubik@gmail.com>
Date: Thu, 28 Sep 2023 10:18:20 +0200
Subject: [PATCH] Add integration for new bors

---
 .github/workflows/ci.yml     | 2 +-
 .reuse/dep5                  | 1 +
 rust-bors.toml               | 1 +
 src/ci/github-actions/ci.yml | 2 +-
 4 files changed, 4 insertions(+), 2 deletions(-)
 create mode 100644 rust-bors.toml

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4dcc9556965ba..624608cc47744 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -542,7 +542,7 @@ jobs:
       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
       AWS_REGION: us-west-1
       CACHE_DOMAIN: ci-caches.rust-lang.org
-    if: "github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
+    if: "github.event_name == 'push' && (((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust') || ((github.ref == 'refs/heads/automation/bors/try') && github.repository == 'rust-lang/rust'))"
     strategy:
       matrix:
         include:
diff --git a/.reuse/dep5 b/.reuse/dep5
index 5546a7cf39112..245ed2659f91f 100644
--- a/.reuse/dep5
+++ b/.reuse/dep5
@@ -25,6 +25,7 @@ Files: compiler/*
        README.md
        RELEASES.md
        rustfmt.toml
+       rust-bors.toml
        triagebot.toml
        x
        x.ps1
diff --git a/rust-bors.toml b/rust-bors.toml
new file mode 100644
index 0000000000000..54f4f641248cd
--- /dev/null
+++ b/rust-bors.toml
@@ -0,0 +1 @@
+timeout = 7200
diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml
index cbf848cb4a3b1..6d25b2c9cc2b3 100644
--- a/src/ci/github-actions/ci.yml
+++ b/src/ci/github-actions/ci.yml
@@ -691,7 +691,7 @@ jobs:
     env:
       DIST_TRY_BUILD: 1
       <<: [*shared-ci-variables, *prod-variables]
-    if: github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'
+    if: github.event_name == 'push' && (((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust') || ((github.ref == 'refs/heads/automation/bors/try') && github.repository == 'rust-lang/rust'))
     strategy:
       matrix:
         include: