File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change 6
6
push :
7
7
branches : ['master']
8
8
schedule :
9
- - cron : ' 00 2 * * *' # At 02:00 UTC every day (like rustup-components-history).
9
+ - cron : ' 10 2 * * *' # At 02:10 UTC every day (a bit after rustup-components-history).
10
+ - cron : ' 20,35,50 9,10 * * *' # for testing
10
11
11
12
jobs :
12
13
test-core :
69
70
- name : check if any dependency failed
70
71
run : jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
71
72
73
+ # Make a PR to update `rust-version` when the cron job succeeds.
74
+ # The primary reason for this is that Github stops running our cron job
75
+ # if there is no repo activity for a while, so we use these PRs to generate activity.
76
+ cron-success-pr :
77
+ name : automatic rustup PR
78
+ runs-on : ubuntu-latest
79
+ needs : [success]
80
+ if : github.event_name == 'schedule'
81
+ steps :
82
+ - name : setup bot git name and email
83
+ run : |
84
+ git config --global user.name 'The Miri Conjob Bot'
85
+ git config --global user.email '[email protected] '
86
+ - name : Create PR
87
+ run : |
88
+ # Create commit
89
+ DATE=$(date -u +%Y-%m-%d)
90
+ echo "nightly-$DATE" > rust-version
91
+ git commit -am "automatic rustup"
92
+ # Switch to a PR branch
93
+ BRANCH="rustup-$DATE"
94
+ git switch -c $BRANCH
95
+ git push -u origin $BRANCH
96
+ # Create PR
97
+ gh pr create -B master --title 'Automatic Rustup' --body ''
98
+
72
99
# Send a Zulip notification when a cron job fails
73
100
cron-fail-notify :
74
101
name : cronjob failure notification
You can’t perform that action at this time.
0 commit comments