mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-08 17:08:35 +08:00
fix(ci): checkout Wiki main branch
This commit is contained in:
@@ -24,7 +24,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: jxxghp/MoviePilot-Wiki
|
repository: jxxghp/MoviePilot-Wiki
|
||||||
ref: v3
|
ref: main
|
||||||
path: .build/moviepilot-wiki
|
path: .build/moviepilot-wiki
|
||||||
sparse-checkout: plugin.md
|
sparse-checkout: plugin.md
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: jxxghp/MoviePilot-Wiki
|
repository: jxxghp/MoviePilot-Wiki
|
||||||
ref: v3
|
ref: main
|
||||||
path: .build/moviepilot-wiki
|
path: .build/moviepilot-wiki
|
||||||
sparse-checkout: plugin.md
|
sparse-checkout: plugin.md
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ chmod +x scripts/start-local.sh
|
|||||||
|
|
||||||
### 4.1 GitHub 发版时生成插件市场默认值
|
### 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` 标记区域,将规范化、去重后的公开仓库清单写入构建工作区。
|
||||||
|
|
||||||
生成过程遵循以下约束:
|
生成过程遵循以下约束:
|
||||||
|
|
||||||
|
|||||||
@@ -31,21 +31,21 @@ def test_install_and_docker_paths_do_not_reference_v2_resources():
|
|||||||
assert "resources.v3" in content
|
assert "resources.v3" in content
|
||||||
|
|
||||||
|
|
||||||
def test_v3_release_workflows_use_isolated_branches_and_images():
|
def test_v3_release_workflows_use_main_wiki_and_isolated_images():
|
||||||
"""V3 正式版和 Beta 构建不得写入 V2 或无版本后缀的镜像仓库。"""
|
"""V3 正式版和 Beta 构建应读取主 Wiki 分支并保持镜像仓库隔离。"""
|
||||||
build_workflow = (ROOT_DIR / ".github" / "workflows" / "build-v3.yml").read_text(encoding="utf-8")
|
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")
|
beta_workflow = (ROOT_DIR / ".github" / "workflows" / "beta.yml").read_text(encoding="utf-8")
|
||||||
|
|
||||||
assert "name: MoviePilot Builder v3" in build_workflow
|
assert "name: MoviePilot Builder v3" in build_workflow
|
||||||
assert " - 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 "${{ secrets.DOCKER_USERNAME }}/moviepilot-v3" in build_workflow
|
||||||
assert "ghcr.io/${{ github.repository }}-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-v2" not in build_workflow
|
||||||
assert "${{ secrets.DOCKER_USERNAME }}/moviepilot\n" not in build_workflow
|
assert "${{ secrets.DOCKER_USERNAME }}/moviepilot\n" not in build_workflow
|
||||||
assert "git tag -l 'v3.*'" 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 "${{ secrets.DOCKER_USERNAME }}/moviepilot-v3" in beta_workflow
|
||||||
assert "ghcr.io/${{ github.repository }}-v3" in beta_workflow
|
assert "ghcr.io/${{ github.repository }}-v3" in beta_workflow
|
||||||
assert "${{ secrets.DOCKER_USERNAME }}/moviepilot-v2" not in beta_workflow
|
assert "${{ secrets.DOCKER_USERNAME }}/moviepilot-v2" not in beta_workflow
|
||||||
|
|||||||
Reference in New Issue
Block a user