Skip to content

Commit 6af9880

Browse files
authored
Add CI workflow for automatically performing subtree sync pulls
This CI workflow will run the https://github.com/rust-lang/josh-sync tool on Mondays and Thursdays. It will try to do a pull (sync stdarch changes from rust-lang/rust into this repository). When it runs, three things can happen: - There are no rustc changes to be pulled, the bot does nothing. - There are some new changes to be pulled. In that case, the bot will either open or update an existing PR titled "Rustc pull update" on this repository with the changes. After the PR is merged, we should ideally do the opposite sync (push) manually. - The pull fails (usually because of a merge conflict), or the bot determines that a pull PR has been opened for more than a week without being merged. In that case, it will post a ping to https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/compiler-builtins.20subtree.20sync.20automation/with/528482375.
1 parent 7bba268 commit 6af9880

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/rustc-pull.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Perform a subtree sync (pull) using the josh-sync tool once every few days (or on demand).
2+
name: rustc-pull
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
# Run at 04:00 UTC every Monday and Thursday
8+
- cron: '0 4 * * 1,4'
9+
10+
jobs:
11+
pull:
12+
if: github.repository == 'rust-lang/compiler-builtins'
13+
uses: rust-lang/josh-sync/.github/workflows/rustc-pull.yml@main
14+
with:
15+
# https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/compiler-builtins.20subtree.20sync.20automation/with/528482375
16+
zulip-stream-id: 219381
17+
zulip-topic: 'compiler-builtins subtree sync automation'
18+
zulip-bot-email: "[email protected]"
19+
pr-base-branch: master
20+
branch-name: rustc-pull
21+
secrets:
22+
zulip-api-token: ${{ secrets.ZULIP_API_TOKEN }}
23+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)