diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 577cabe08..67d32edfc 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -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 diff --git a/.github/workflows/build-v3.yml b/.github/workflows/build-v3.yml index ac711ec26..b11b256f5 100644 --- a/.github/workflows/build-v3.yml +++ b/.github/workflows/build-v3.yml @@ -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 diff --git a/docs/development-setup.md b/docs/development-setup.md index 92aaa9557..86ab17ee9 100644 --- a/docs/development-setup.md +++ b/docs/development-setup.md @@ -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` 标记区域,将规范化、去重后的公开仓库清单写入构建工作区。 生成过程遵循以下约束: diff --git a/tests/test_resource_v3.py b/tests/test_resource_v3.py index d419c992b..600e04241 100644 --- a/tests/test_resource_v3.py +++ b/tests/test_resource_v3.py @@ -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