-
Notifications
You must be signed in to change notification settings - Fork 102
79 lines (64 loc) · 2.75 KB
/
merge-main-nightly.yml
File metadata and controls
79 lines (64 loc) · 2.75 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This job merges every commit to `main` into `nightly-testing`, resolving merge conflicts in favor of `nightly-testing`.
name: Merge main to nightly
on:
schedule:
- cron: "0 9/6 * * *"
# Run every six hours, starting at 10:00AM CET/1:00AM PT.
# This is 30 minutes prior to the reference manual updating its own nightly-testing branch.
workflow_dispatch:
env:
TARGET_BRANCH: nightly-testing
jobs:
merge-to-nightly:
runs-on: nscloud-ubuntu-22.04-amd64-8x16
if: github.repository == 'leanprover/verso'
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ env.TARGET_BRANCH }}
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Merge main, favoring nightly changes
run: |
git checkout ${{ env.TARGET_BRANCH }}
# If the merge goes badly, we proceed anyway via '|| true'.
git merge origin/main --strategy-option ours --no-commit --allow-unrelated-histories || true
- name: Install elan
run: |
set -o pipefail
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.1.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
./elan-init -y --default-toolchain none
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
- name: Update dependencies
run: |
lake --keep-toolchain update
./update-subverso.sh
- name: Build
run: |
lake build
- name: Test
run: |
lake test
- name: Generate the test website
run: |
lake exe demosite --output _out/test-projects/demosite
- name: Generate the example genre's document
run: |
lake exe simplepage
- name: Install PDF Dependencies
uses: ./.github/actions/install-texlive
- name: Generate the manual
run: |
./generate.sh
- name: Commit and push
run: |
git add .
# If there's nothing to do (because there are no new commits from main),
# that's okay, hence the '|| true'.
git commit -m "chore: merge main into ${{ env.TARGET_BRANCH }}" || true
git push origin ${{ env.TARGET_BRANCH }}