@@ -156,13 +156,13 @@ jobs:
156
156
- name : mark the job as a failure
157
157
run : exit 1
158
158
159
- # Send a Zulip notification when a cron job fails
160
159
cron-fail-notify :
161
160
name : cronjob failure notification
162
161
runs-on : ubuntu-latest
163
162
needs : [build, style]
164
163
if : github.event_name == 'schedule' && (failure() || cancelled())
165
164
steps :
165
+ # Send a Zulip notification
166
166
- name : Install zulip-send
167
167
run : pip3 install zulip
168
168
- name : Send Zulip notification
@@ -185,3 +185,27 @@ jobs:
185
185
Sincerely,
186
186
The Miri Cronjobs Bot' \
187
187
--user $ZULIP_BOT_EMAIL --api-key $ZULIP_API_TOKEN --site https://rust-lang.zulipchat.com
188
+ # Attempt to auto-sync with rustc
189
+ - name : install josh-proxy
190
+ run : cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r22.12.06
191
+ - name : start josh-proxy
192
+ run : josh-proxy --local=$HOME/.cache/josh --remote=https://github.com --no-background &
193
+ - name : setup bot git name and email
194
+ run : |
195
+ git config --global user.name 'The Miri Conjob Bot'
196
+ git config --global user.email 'miri@cron.bot'
197
+ - name : get changes from rustc
198
+ run : ./miri rustc-pull
199
+ - name : format changes (if any)
200
+ run : |
201
+ ./miri toolchain
202
+ ./miri fmt --check || (./miri fmt && git commit -am "fmt")
203
+ - name : Push changes to a branch
204
+ run : |
205
+ git switch -c "rustup$(date -u +%Y-%m)"
206
+ git push
207
+ - name : Create Pull Request
208
+ run : gh pr create -B master --title 'Automatic sync from rustc' --body ''
209
+ env :
210
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
211
+
0 commit comments