File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : rustc-pull
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ pull_request :
6
+ schedule :
7
+ # Run at 04:00 UTC every Monday
8
+ - cron : ' 0 4 * * 1'
9
+
10
+ jobs :
11
+ pull :
12
+ # if: github.repository == 'rust-lang/rustc-dev-guide'
13
+ runs-on : ubuntu-latest
14
+ permissions :
15
+ contents : read
16
+ pull-requests : write
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - name : Install stable Rust toolchain
20
+ run : rustup update stable
21
+ - uses : Swatinem/rust-cache@v2
22
+ with :
23
+ workspaces : " josh-sync"
24
+ - name : Install Josh
25
+ run : RUSTFLAGS="--cap-lints warn" cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
26
+ - name : Setup bot git name and email
27
+ run : |
28
+ git config --global user.name 'The rustc-dev-guide Cronjob Bot'
29
+ git config --global user.email '[email protected] '
30
+ - name : Perform rustc-pull
31
+ run : cargo run --manifest-path josh-sync/Cargo.toml -- rustc-pull
32
+ - name : Push changes to a branch
33
+ run : |
34
+ BRANCH="rustc-pull-$(date -u +%Y-%m-%d)"
35
+ git switch -c $BRANCH
36
+ git push -u origin $BRANCH
37
+ - name : Create pull request
38
+ run : |
39
+ gh pr create -B master --title 'Rustc pull update' --body 'Latest update from rustc.'
40
+ # env:
41
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -6,3 +6,6 @@ allow-unauthenticated = [
6
6
" waiting-on-author" ,
7
7
" blocked" ,
8
8
]
9
+
10
+ # Automatically close and reopen PRs made by bots to run CI on them
11
+ [bot-pull-requests ]
You can’t perform that action at this time.
0 commit comments