forked from hjenryin/BCJH-Metropolis
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.45 KB
/
syncBuildTest.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
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
name: C/C++ CI
on:
push:
branches:
- "main"
paths:
- "data/userData.json"
workflow_dispatch:
jobs:
sync_with_upstream:
permissions:
contents: write
runs-on: ubuntu-latest
name: Sync main with upstream latest
steps:
# Step 1: run a standard checkout action, provided by github
- name: Checkout main
uses: actions/checkout@v3
with:
ref: main
# REQUIRED step
# Step 2: run the sync action
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: main
# REQUIRED 'target_repo_token' exactly like this!
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
upstream_sync_branch: main
upstream_sync_repo: hjenryin/BCJH-Metropolis
upstream_pull_args: '--allow-unrelated-histories --no-rebase -s recursive -Xours'
- name: OnFailure
if: failure()
run: sh assets/failure.sh
buildTest:
permissions:
contents: write
runs-on: ubuntu-latest
needs: sync_with_upstream
steps:
- uses: actions/checkout@v3
- name: update
run: sh assets/checkUpdate.sh
- name: commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 自动拉取图鉴网数据并更新规则
file_pattern: "data/data.min.json rule.hpp"
skip_dirty_check: false
- name: buildTest
run: sh assets/run.sh