File tree Expand file tree Collapse file tree 4 files changed +11
-18
lines changed
Expand file tree Collapse file tree 4 files changed +11
-18
lines changed Original file line number Diff line number Diff line change 11name : Performance Benchmark
22
3+ run-name : " ⚡ Benchmark · ${{ github.event_name == 'workflow_dispatch' && 'Manual Run' || github.event.workflow_run.head_branch }}"
4+
35on :
4- push :
5- branches :
6- - main
7- pull_request :
86 workflow_run :
97 workflows : ["Unit Tests"]
108 types :
1715 # 依赖 unit test 成功,或手动触发
1816 if : |
1917 github.event_name == 'workflow_dispatch' ||
20- github.event_name == 'push' ||
21- github.event_name == 'pull_request' ||
2218 (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
2319 runs-on : ubuntu-latest
2420 steps :
Original file line number Diff line number Diff line change 11name : Documentation
22
3+ run-name : " 📚 Documentation · ${{ github.event_name == 'workflow_dispatch' && 'Manual Deploy' || github.event.workflow_run.head_branch }}"
4+
35on :
4- push :
5- branches : [main]
66 workflow_run :
77 workflows : ["Unit Tests"]
88 types :
3636 # Build job
3737 generate_docs :
3838 runs-on : ubuntu-latest
39- # 只在 push 到 main 或 unit test 成功后执行
39+ # 只在 unit test 成功后或手动触发时执行
4040 if : |
4141 github.event_name == 'workflow_dispatch' ||
42- github.event_name == 'push' ||
4342 (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
4443 steps :
4544 - name : Checkout
Original file line number Diff line number Diff line change 11name : Code Format Check
22
3+ run-name : " 🎨 Format Check · ${{ github.event_name == 'pull_request' && format('PR #{0}', github.event.pull_request.number) || github.ref_name }}"
4+
35on :
46 push :
57 branches :
Original file line number Diff line number Diff line change 11name : Unit Tests
22
3+ run-name : " 🧪 Unit Tests · ${{ github.event_name == 'schedule' && 'Scheduled (master)' || (github.event_name == 'workflow_dispatch' && 'Manual Run' || github.event.workflow_run.head_branch) }}"
4+
35on :
4- push :
5- branches :
6- - main
7- pull_request :
86 schedule :
97 # 每天凌晨 2 点执行
108 - cron : " 0 2 * * *"
1715jobs :
1816 test :
1917 name : Unit Test
20- # 依赖 format check,但定时任务或手动触发时跳过
18+ # 依赖 format check 成功,或定时任务/手动触发时执行
2119 if : |
2220 github.event_name == 'schedule' ||
2321 github.event_name == 'workflow_dispatch' ||
24- (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') ||
25- github.event_name == 'push' ||
26- github.event_name == 'pull_request'
22+ (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
2723 strategy :
2824 matrix :
2925 os : [ubuntu-latest]
You can’t perform that action at this time.
0 commit comments