Skip to content

Commit d9d7f75

Browse files
committed
chore(submodule): remove cfg/yaml submodule and increase sync frequency
1 parent fa623bf commit d9d7f75

3 files changed

Lines changed: 4 additions & 11 deletions

File tree

.github/workflows/sync-openclash-overwrite-submodule.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Sync OpenClash_Overwrite Submodule
22

33
on:
44
schedule:
5-
# 上游通常不是高频更新,每天同步一次即可。
6-
- cron: "41 1 * * *"
5+
# 每 2 小时自动检查并同步一次上游最新 Commit
6+
- cron: "0 */2 * * *"
77
workflow_dispatch:
88

99
permissions:
@@ -27,24 +27,22 @@ jobs:
2727
run: |
2828
submodule_paths=(
2929
"overwrite/OpenClash_Overwrite"
30-
"cfg/yaml/OpenClash_Overwrite"
3130
)
3231
33-
# .gitmodules 中两个入口均跟踪 main,同步后会指向同一最新提交
32+
# .gitmodules 中跟踪 main,同步后会指向最新提交
3433
git submodule update --init --remote --checkout "${submodule_paths[@]}"
3534
3635
- name: Commit and push if needed
3736
run: |
3837
submodule_paths=(
3938
"overwrite/OpenClash_Overwrite"
40-
"cfg/yaml/OpenClash_Overwrite"
4139
)
4240
4341
if [ -n "$(git status --porcelain -- "${submodule_paths[@]}")" ]; then
4442
git config user.name "github-actions[bot]"
4543
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
4644
git add -- "${submodule_paths[@]}"
47-
git commit -m "chore(overwrite): sync OpenClash_Overwrite submodules"
45+
git commit -m "chore(overwrite): sync OpenClash_Overwrite submodule"
4846
# 使用 pull --rebase 防止多人同时 push 导致的冲突
4947
git pull --rebase origin main
5048
git push origin HEAD:main

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@
22
path = overwrite/OpenClash_Overwrite
33
url = https://github.com/Giveupmoon/OpenClash_Overwrite
44
branch = main
5-
[submodule "cfg/yaml/OpenClash_Overwrite"]
6-
path = cfg/yaml/OpenClash_Overwrite
7-
url = https://github.com/Giveupmoon/OpenClash_Overwrite
8-
branch = main

cfg/yaml/OpenClash_Overwrite

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)