forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 1.25 KB
/
nightly_merge_master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This job merges every commit to `master` into `nightly-testing`, resolving merge conflicts in favor of `nightly-testing`.
name: Merge master to nightly
on:
schedule:
- cron: '30 */3 * * *' # 8AM CET/11PM PT
jobs:
merge-to-nightly:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.NIGHTLY_TESTING }}
- name: Configure Git User
run: |
git config user.name "leanprover-community-mathlib4-bot"
git config user.email "[email protected]"
- name: Merge master to nightly favoring nightly changes
run: |
git checkout nightly-testing
# If the merge goes badly, we proceed anyway via '|| true'.
# CI will report failures on the 'nightly-testing' branch direct to Zulip.
git merge master --strategy-option ours --no-commit --allow-unrelated-histories || true
git add .
# If there's nothing to do (because there are no new commits from master),
# that's okay, hence the '|| true'.
git commit -m "Merge master into nightly-testing" || true
git push origin nightly-testing