fix(ci): checkout Wiki main branch

This commit is contained in:
jxxghp
2026-08-09 17:20:24 +08:00
parent 9d781d33c2
commit af2c9754e1
4 changed files with 7 additions and 7 deletions

View File

@@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: jxxghp/MoviePilot-Wiki
ref: v3
ref: main
path: .build/moviepilot-wiki
sparse-checkout: plugin.md
sparse-checkout-cone-mode: false

View File

@@ -33,7 +33,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: jxxghp/MoviePilot-Wiki
ref: v3
ref: main
path: .build/moviepilot-wiki
sparse-checkout: plugin.md
sparse-checkout-cone-mode: false

View File

@@ -112,7 +112,7 @@ chmod +x scripts/start-local.sh
### 4.1 GitHub 发版时生成插件市场默认值
源码分支中的 `ConfigModel.PLUGIN_MARKET` 只保留官方插件仓库作为离线兜底。GitHub 的 V3 正式版与 Beta 镜像构建会检出 `MoviePilot-Wiki` 的 `v3` 分支,并由 `scripts/generate_plugin_market_default.py` 读取 `plugin.md` 中 `plugin-market-repos:start/end` 标记区域,将规范化、去重后的公开仓库清单写入构建工作区。
源码分支中的 `ConfigModel.PLUGIN_MARKET` 只保留官方插件仓库作为离线兜底。GitHub 的 V3 正式版与 Beta 镜像构建会检出 `MoviePilot-Wiki` 的 `main` 分支,并由 `scripts/generate_plugin_market_default.py` 读取 `plugin.md` 中 `plugin-market-repos:start/end` 标记区域,将规范化、去重后的公开仓库清单写入构建工作区。
生成过程遵循以下约束:

View File

@@ -31,21 +31,21 @@ def test_install_and_docker_paths_do_not_reference_v2_resources():
assert "resources.v3" in content
def test_v3_release_workflows_use_isolated_branches_and_images():
"""V3 正式版和 Beta 构建不得写入 V2 或无版本后缀的镜像仓库。"""
def test_v3_release_workflows_use_main_wiki_and_isolated_images():
"""V3 正式版和 Beta 构建应读取主 Wiki 分支并保持镜像仓库隔离"""
build_workflow = (ROOT_DIR / ".github" / "workflows" / "build-v3.yml").read_text(encoding="utf-8")
beta_workflow = (ROOT_DIR / ".github" / "workflows" / "beta.yml").read_text(encoding="utf-8")
assert "name: MoviePilot Builder v3" in build_workflow
assert " - v3" in build_workflow
assert " ref: v3" in build_workflow
assert " repository: jxxghp/MoviePilot-Wiki\n ref: main" in build_workflow
assert "${{ secrets.DOCKER_USERNAME }}/moviepilot-v3" in build_workflow
assert "ghcr.io/${{ github.repository }}-v3" in build_workflow
assert "${{ secrets.DOCKER_USERNAME }}/moviepilot-v2" not in build_workflow
assert "${{ secrets.DOCKER_USERNAME }}/moviepilot\n" not in build_workflow
assert "git tag -l 'v3.*'" in build_workflow
assert " ref: v3" in beta_workflow
assert " repository: jxxghp/MoviePilot-Wiki\n ref: main" in beta_workflow
assert "${{ secrets.DOCKER_USERNAME }}/moviepilot-v3" in beta_workflow
assert "ghcr.io/${{ github.repository }}-v3" in beta_workflow
assert "${{ secrets.DOCKER_USERNAME }}/moviepilot-v2" not in beta_workflow