mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-08 17:08:35 +08:00
ci(v3): publish isolated docker images
This commit is contained in:
@@ -8,7 +8,7 @@ body:
|
||||
value: |
|
||||
请说明你希望添加的功能。
|
||||
|
||||
站点适配请求请先按 [站点适配采集说明](https://github.com/jxxghp/MoviePilot/blob/v2/docs/site-adapter-capture.md) 生成脱敏 ZIP,并在下方附加。Issue 及附件是公开内容,提交前必须解压预览四个文件。不要上传 Cookie、Authorization、通行密钥、会话字段或任何原始数据。
|
||||
站点适配请求请先按 [站点适配采集说明](https://github.com/jxxghp/MoviePilot/blob/v3/docs/site-adapter-capture.md) 生成脱敏 ZIP,并在下方附加。Issue 及附件是公开内容,提交前必须解压预览四个文件。不要上传 Cookie、Authorization、通行密钥、会话字段或任何原始数据。
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: jxxghp/MoviePilot-Wiki
|
||||
ref: main
|
||||
ref: v3
|
||||
path: .build/moviepilot-wiki
|
||||
sparse-checkout: plugin.md
|
||||
sparse-checkout-cone-mode: false
|
||||
@@ -44,8 +44,8 @@ jobs:
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ secrets.DOCKER_USERNAME }}/moviepilot-v2
|
||||
ghcr.io/${{ github.repository }}
|
||||
${{ secrets.DOCKER_USERNAME }}/moviepilot-v3
|
||||
ghcr.io/${{ github.repository }}-v3
|
||||
tags: |
|
||||
type=raw,value=beta
|
||||
|
||||
@@ -81,5 +81,5 @@ jobs:
|
||||
labels: |
|
||||
${{ steps.meta.outputs.labels }}
|
||||
org.moviepilot.plugin-market-wiki-revision=${{ steps.plugin_market.outputs.wiki_commit }}
|
||||
cache-from: type=gha,scope=moviepilot-docker,version=2
|
||||
cache-to: type=gha,scope=moviepilot-docker,mode=max,version=2
|
||||
cache-from: type=gha,scope=moviepilot-v3-docker,version=2
|
||||
cache-to: type=gha,scope=moviepilot-v3-docker,mode=max,version=2
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
name: MoviePilot Builder v2
|
||||
name: MoviePilot Builder v3
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- v2
|
||||
- v3
|
||||
paths:
|
||||
- 'version.py'
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: jxxghp/MoviePilot-Wiki
|
||||
ref: main
|
||||
ref: v3
|
||||
path: .build/moviepilot-wiki
|
||||
sparse-checkout: plugin.md
|
||||
sparse-checkout-cone-mode: false
|
||||
@@ -66,9 +66,8 @@ jobs:
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ secrets.DOCKER_USERNAME }}/moviepilot-v2
|
||||
${{ secrets.DOCKER_USERNAME }}/moviepilot
|
||||
ghcr.io/${{ github.repository }}
|
||||
${{ secrets.DOCKER_USERNAME }}/moviepilot-v3
|
||||
ghcr.io/${{ github.repository }}-v3
|
||||
tags: |
|
||||
type=raw,value=${{ env.app_version }}
|
||||
type=raw,value=latest
|
||||
@@ -106,14 +105,14 @@ jobs:
|
||||
${{ steps.meta.outputs.labels }}
|
||||
org.opencontainers.image.revision=${{ steps.release_snapshot.outputs.release_commit }}
|
||||
org.moviepilot.plugin-market-wiki-revision=${{ steps.plugin_market.outputs.wiki_commit }}
|
||||
cache-from: type=gha,scope=moviepilot-docker,version=2
|
||||
cache-to: type=gha,scope=moviepilot-docker,mode=max,version=2
|
||||
cache-from: type=gha,scope=moviepilot-v3-docker,version=2
|
||||
cache-to: type=gha,scope=moviepilot-v3-docker,mode=max,version=2
|
||||
|
||||
- name: Generate Changelog
|
||||
id: changelog
|
||||
run: |
|
||||
# 获取上一个 tag(排除当前版本的 tag)
|
||||
PREVIOUS_TAG=$(git tag -l 'v*' --sort=-v:refname | grep -v "^v${{ env.app_version }}$" | head -n 1)
|
||||
PREVIOUS_TAG=$(git tag -l 'v3.*' --sort=-v:refname | grep -v "^v${{ env.app_version }}$" | head -n 1)
|
||||
echo "Previous tag: $PREVIOUS_TAG"
|
||||
|
||||
# 使用 || 作为分隔符,同时获取 commit 消息和作者 GitHub 用户名
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
name: Unit Tests
|
||||
|
||||
on:
|
||||
# 指向 v2 的 PR 与推送都跑全量单测,作为合并门禁
|
||||
# 指向 v3 的 PR 与推送都跑全量单测,作为合并门禁
|
||||
pull_request:
|
||||
branches:
|
||||
- v2
|
||||
- v3
|
||||
push:
|
||||
branches:
|
||||
- v2
|
||||
- v3
|
||||
# 允许手动触发
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
基于 [NAStool](https://github.com/NAStool/nas-tools) 部分代码重新设计,聚焦自动化核心需求,减少问题同时更易于扩展和维护。
|
||||
@@ -26,7 +27,7 @@
|
||||
|
||||
## 安装使用
|
||||
|
||||
推荐优先使用 Docker 部署,常用镜像包括 `jxxghp/moviepilot-v2` 和 `jxxghp/moviepilot`。Compose 示例、环境变量、目录映射和升级方式以官方 Wiki 为准:
|
||||
推荐优先使用 Docker 部署。V3 使用独立镜像 `jxxghp/moviepilot-v3`,V2 和旧版镜像保持原命名。Compose 示例、环境变量、目录映射和升级方式以官方 Wiki 为准:
|
||||
|
||||
- 官方 Wiki:https://wiki.movie-pilot.org
|
||||
- PostgreSQL 部署说明:[docs/postgresql-setup.md](docs/postgresql-setup.md)
|
||||
@@ -34,7 +35,7 @@
|
||||
也可以使用本地 CLI 以源码模式安装和管理 MoviePilot:
|
||||
|
||||
```shell
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v2/scripts/bootstrap-local.sh | bash
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v3/scripts/bootstrap-local.sh | bash
|
||||
```
|
||||
|
||||
安装完成后使用 `moviepilot` 命令完成初始化、启动、停止、更新和配置查看。完整命令见 [docs/cli.md](docs/cli.md)。
|
||||
|
||||
+3
-2
@@ -9,6 +9,7 @@
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
Redesigned from parts of [NAStool](https://github.com/NAStool/nas-tools), with a stronger focus on core automation scenarios while reducing issues and making the project easier to extend and maintain.
|
||||
@@ -26,7 +27,7 @@ Release channel: https://t.me/moviepilot_channel
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
Docker is the recommended deployment model. Common images include `jxxghp/moviepilot-v2` and `jxxghp/moviepilot`. Compose examples, environment variables, volume mappings, and upgrade notes are maintained in the official wiki:
|
||||
Docker is the recommended deployment model. V3 uses the dedicated `jxxghp/moviepilot-v3` image; V2 and legacy images keep their existing names. Compose examples, environment variables, volume mappings, and upgrade notes are maintained in the official wiki:
|
||||
|
||||
- Official wiki: https://wiki.movie-pilot.org
|
||||
- PostgreSQL setup: [docs/postgresql-setup.md](docs/postgresql-setup.md)
|
||||
@@ -34,7 +35,7 @@ Docker is the recommended deployment model. Common images include `jxxghp/moviep
|
||||
MoviePilot can also be installed and managed from source with the local CLI:
|
||||
|
||||
```shell
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v2/scripts/bootstrap-local.sh | bash
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v3/scripts/bootstrap-local.sh | bash
|
||||
```
|
||||
|
||||
After installation, use the `moviepilot` command for initialization, service management, updates, and configuration. See [docs/cli.md](docs/cli.md) for the full command reference.
|
||||
|
||||
+2
-2
@@ -104,11 +104,11 @@ RUN FRONTEND_VERSION=$(sed -n "s/^FRONTEND_VERSION\s*=\s*'\([^']*\)'/\1/p" /app/
|
||||
&& mv -f /tmp/MoviePilot-Plugins-main/plugins.v2/* /app/app/plugins/ \
|
||||
&& cat /tmp/MoviePilot-Plugins-main/package.json | jq -r 'to_entries[] | select(.value.v2 == true) | .key' | awk '{print tolower($0)}' | \
|
||||
while read -r i; do if [ ! -d "/app/app/plugins/$i" ]; then mv "/tmp/MoviePilot-Plugins-main/plugins/$i" "/app/app/plugins/"; else echo "跳过 $i"; fi; done \
|
||||
&& curl -fsSL "https://raw.githubusercontent.com/jxxghp/MoviePilot-Resources/main/resources.v3/user.sites.v3.bin" -o /app/app/helper/user.sites.v3.bin \
|
||||
&& curl -fsSL "https://raw.githubusercontent.com/jxxghp/MoviePilot-Resources/v3/resources.v3/user.sites.v3.bin" -o /app/app/helper/user.sites.v3.bin \
|
||||
&& python_ver=$(python3 -c 'import sys; print(f"cpython-{sys.version_info.major}{sys.version_info.minor}")') \
|
||||
&& ARCH=$(uname -m) \
|
||||
&& if [ "$ARCH" = "aarch64" ]; then SUFFIX="aarch64-linux-gnu"; else SUFFIX="x86_64-linux-gnu"; fi \
|
||||
&& curl -fsSL "https://raw.githubusercontent.com/jxxghp/MoviePilot-Resources/main/resources.v3/sites.${python_ver}-${SUFFIX}.so" -o "/app/app/helper/sites.${python_ver}-${SUFFIX}.so"
|
||||
&& curl -fsSL "https://raw.githubusercontent.com/jxxghp/MoviePilot-Resources/v3/resources.v3/sites.${python_ver}-${SUFFIX}.so" -o "/app/app/helper/sites.${python_ver}-${SUFFIX}.so"
|
||||
|
||||
# final 阶段: 安装运行时依赖和配置最终镜像
|
||||
FROM prepare_package AS final
|
||||
|
||||
+16
-16
@@ -118,16 +118,16 @@ function install_backend_and_download_resources() {
|
||||
WARN "未找到requirements.in文件,跳过依赖检查"
|
||||
fi
|
||||
|
||||
# 如果是"heads/v2.zip",则查找v2开头的最新版本号
|
||||
if [[ "${1}" == "heads/v2.zip" ]]; then
|
||||
# 如果是"heads/v3.zip",则查找v3开头的最新版本号
|
||||
if [[ "${1}" == "heads/v3.zip" ]]; then
|
||||
INFO "→ 正在获取前端最新版本号..."
|
||||
# 获取所有发布的版本列表,并筛选出以v2开头的版本号
|
||||
releases=$(curl ${CURL_OPTIONS} "https://api.github.com/repos/jxxghp/MoviePilot-Frontend/releases" ${CURL_HEADERS} | jq -r '.[].tag_name' | grep "^v2\.")
|
||||
# 获取所有发布的版本列表,并筛选出以v3开头的版本号
|
||||
releases=$(curl ${CURL_OPTIONS} "https://api.github.com/repos/jxxghp/MoviePilot-Frontend/releases" ${CURL_HEADERS} | jq -r '.[].tag_name' | grep "^v3\.")
|
||||
if [ -z "$releases" ]; then
|
||||
WARN "未找到任何v2前端版本,继续启动..."
|
||||
WARN "未找到任何v3前端版本,继续启动..."
|
||||
return 1
|
||||
else
|
||||
# 找到最新的v2版本
|
||||
# 找到最新的v3版本
|
||||
frontend_version=$(echo "$releases" | sort -V | tail -n 1)
|
||||
fi
|
||||
INFO "前端最新版本号:${frontend_version}"
|
||||
@@ -184,7 +184,7 @@ function install_backend_and_download_resources() {
|
||||
fi
|
||||
INFO "当前 Python 版本:${python_version},架构:${arch}"
|
||||
# 下载 V3 站点索引
|
||||
if ! curl ${CURL_OPTIONS} "${GITHUB_PROXY}https://raw.githubusercontent.com/jxxghp/MoviePilot-Resources/main/resources.v3/user.sites.v3.bin" -o /app/app/helper/user.sites.v3.bin; then
|
||||
if ! curl ${CURL_OPTIONS} "${GITHUB_PROXY}https://raw.githubusercontent.com/jxxghp/MoviePilot-Resources/v3/resources.v3/user.sites.v3.bin" -o /app/app/helper/user.sites.v3.bin; then
|
||||
if [ -f /resources_bakcup/user.sites.v3.bin ]; then
|
||||
cp -a /resources_bakcup/user.sites.v3.bin /app/app/helper/
|
||||
fi
|
||||
@@ -192,7 +192,7 @@ function install_backend_and_download_resources() {
|
||||
fi
|
||||
# 下载对应平台的 sites 文件
|
||||
sites_file="sites.${python_version}-${arch_suffix}.so"
|
||||
if ! curl ${CURL_OPTIONS} "${GITHUB_PROXY}https://raw.githubusercontent.com/jxxghp/MoviePilot-Resources/main/resources.v3/${sites_file}" -o "/app/app/helper/${sites_file}"; then
|
||||
if ! curl ${CURL_OPTIONS} "${GITHUB_PROXY}https://raw.githubusercontent.com/jxxghp/MoviePilot-Resources/v3/resources.v3/${sites_file}" -o "/app/app/helper/${sites_file}"; then
|
||||
if [ -f "/resources_bakcup/${sites_file}" ]; then
|
||||
cp -a "/resources_bakcup/${sites_file}" /app/app/helper/
|
||||
fi
|
||||
@@ -381,23 +381,23 @@ if [[ "${MOVIEPILOT_AUTO_UPDATE}" = "true" ]] || [[ "${MOVIEPILOT_AUTO_UPDATE}"
|
||||
fi
|
||||
if [ "${MOVIEPILOT_AUTO_UPDATE}" = "dev" ]; then
|
||||
INFO "Dev 更新模式"
|
||||
install_backend_and_download_resources "heads/v2.zip"
|
||||
install_backend_and_download_resources "heads/v3.zip"
|
||||
else
|
||||
INFO "Release 更新模式"
|
||||
old_version=$(grep -m -1 "^\s*APP_VERSION\s*=\s*" /app/version.py | tr -d '\r\n' | awk -F'#' '{print $1}' | sed 's/^[[:space:]]*//; s/[[:space:]]*$//')
|
||||
if [[ "${old_version}" == *APP_VERSION* ]]; then
|
||||
current_version=$(echo "${old_version}" | sed -rn "s/APP_VERSION\s*=\s*['\"](.*)['\"]/\1/gp")
|
||||
INFO "当前版本号:${current_version}"
|
||||
# 获取所有发布的版本列表,并筛选出以v2开头的版本号
|
||||
releases=$(curl ${CURL_OPTIONS} "https://api.github.com/repos/jxxghp/MoviePilot/releases" ${CURL_HEADERS} | jq -r '.[].tag_name' | grep "^v2\.")
|
||||
# 获取所有发布的版本列表,并筛选出以v3开头的版本号
|
||||
releases=$(curl ${CURL_OPTIONS} "https://api.github.com/repos/jxxghp/MoviePilot/releases" ${CURL_HEADERS} | jq -r '.[].tag_name' | grep "^v3\.")
|
||||
if [ -z "$releases" ]; then
|
||||
WARN "未找到任何v2后端版本,继续启动..."
|
||||
WARN "未找到任何v3后端版本,继续启动..."
|
||||
else
|
||||
# 找到最新的v2版本
|
||||
latest_v2=$(echo "$releases" | sort -V | tail -n 1)
|
||||
INFO "最新的v2后端版本号:${latest_v2}"
|
||||
# 找到最新的v3版本
|
||||
latest_v3=$(echo "$releases" | sort -V | tail -n 1)
|
||||
INFO "最新的v3后端版本号:${latest_v3}"
|
||||
# 使用版本号比较函数进行比较,并下载最新版本
|
||||
compare_versions "${current_version}" "${latest_v2}"
|
||||
compare_versions "${current_version}" "${latest_v3}"
|
||||
fi
|
||||
else
|
||||
WARN "当前版本号获取失败,继续启动..."
|
||||
|
||||
+6
-6
@@ -5,7 +5,7 @@
|
||||
## 一键安装
|
||||
|
||||
```shell
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v2/scripts/bootstrap-local.sh | bash
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v3/scripts/bootstrap-local.sh | bash
|
||||
```
|
||||
|
||||
脚本会自动:
|
||||
@@ -168,7 +168,7 @@ moviepilot install deps --config-dir /path/to/moviepilot-config
|
||||
```shell
|
||||
moviepilot install frontend
|
||||
moviepilot install frontend --version latest
|
||||
moviepilot install frontend --version v2.9.31
|
||||
moviepilot install frontend --version v3.0.0
|
||||
moviepilot install frontend --node-version 20.12.1
|
||||
moviepilot install frontend --config-dir /path/to/moviepilot-config
|
||||
```
|
||||
@@ -253,7 +253,7 @@ moviepilot setup --config-dir /path/to/moviepilot-config
|
||||
如果希望在自动化安装时直接预设超级管理员,也可以在一键安装脚本中透传:
|
||||
|
||||
```shell
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v2/scripts/bootstrap-local.sh | \
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v3/scripts/bootstrap-local.sh | \
|
||||
bash -s -- --superuser admin --superuser-password 'ChangeMe123!'
|
||||
```
|
||||
|
||||
@@ -308,8 +308,8 @@ moviepilot uninstall --config-dir /path/to/moviepilot-config
|
||||
```shell
|
||||
moviepilot update backend
|
||||
moviepilot update backend --ref latest
|
||||
moviepilot update backend --ref v2
|
||||
moviepilot update backend --ref v2.9.31
|
||||
moviepilot update backend --ref v3
|
||||
moviepilot update backend --ref v3.0.0
|
||||
```
|
||||
|
||||
更新前端:
|
||||
@@ -317,7 +317,7 @@ moviepilot update backend --ref v2.9.31
|
||||
```shell
|
||||
moviepilot update frontend
|
||||
moviepilot update frontend --frontend-version latest
|
||||
moviepilot update frontend --frontend-version v2.9.31
|
||||
moviepilot update frontend --frontend-version v3.0.0
|
||||
```
|
||||
|
||||
整体更新:
|
||||
|
||||
@@ -112,13 +112,13 @@ chmod +x scripts/start-local.sh
|
||||
|
||||
### 4.1 GitHub 发版时生成插件市场默认值
|
||||
|
||||
源码分支中的 `ConfigModel.PLUGIN_MARKET` 只保留官方插件仓库作为离线兜底。GitHub 的正式版与 Beta 镜像构建会检出 `MoviePilot-Wiki` 的 `main` 分支,并由 `scripts/generate_plugin_market_default.py` 读取 `plugin.md` 中 `plugin-market-repos:start/end` 标记区域,将规范化、去重后的公开仓库清单写入构建工作区。
|
||||
源码分支中的 `ConfigModel.PLUGIN_MARKET` 只保留官方插件仓库作为离线兜底。GitHub 的 V3 正式版与 Beta 镜像构建会检出 `MoviePilot-Wiki` 的 `v3` 分支,并由 `scripts/generate_plugin_market_default.py` 读取 `plugin.md` 中 `plugin-market-repos:start/end` 标记区域,将规范化、去重后的公开仓库清单写入构建工作区。
|
||||
|
||||
生成过程遵循以下约束:
|
||||
|
||||
- 标记必须唯一、顺序正确,清单不能为空且必须包含 `jxxghp/MoviePilot-Plugins`;不满足时直接终止构建。
|
||||
- 生成脚本只替换 `ConfigModel` 中的 `PLUGIN_MARKET` 默认值,不写入运行时环境变量,因此用户仍可通过系统环境变量或 `/config/app.env` 覆盖。
|
||||
- 正式版工作流会创建仅由 Release Tag 引用的本地快照提交,Docker 镜像和 Tag 源码归档均来自该快照;Actions 不会将生成结果回写到 `v2` 分支。
|
||||
- 正式版工作流会创建仅由 Release Tag 引用的本地快照提交,Docker 镜像和 Tag 源码归档均来自该快照;Actions 不会将生成结果回写到 `v3` 分支。
|
||||
- Release Tag 快照提交信息和镜像标签会记录本次使用的 MoviePilot Wiki Commit,便于追溯清单来源。
|
||||
|
||||
本地验证生成结果时,先激活项目虚拟环境,再执行:
|
||||
|
||||
@@ -128,7 +128,7 @@ moviepilot logs --stdio --follow
|
||||
|
||||
```bash
|
||||
# One-line bootstrap installer
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v2/scripts/bootstrap-local.sh | bash
|
||||
curl -fsSL https://raw.githubusercontent.com/jxxghp/MoviePilot/v3/scripts/bootstrap-local.sh | bash
|
||||
|
||||
# Install backend dependencies
|
||||
moviepilot install deps
|
||||
@@ -139,7 +139,7 @@ moviepilot install deps --recreate
|
||||
# Install frontend release
|
||||
moviepilot install frontend
|
||||
moviepilot install frontend --version latest
|
||||
moviepilot install frontend --version v2.9.31
|
||||
moviepilot install frontend --version v3.0.0
|
||||
|
||||
# Install resource files
|
||||
moviepilot install resources
|
||||
@@ -167,7 +167,7 @@ moviepilot uninstall
|
||||
```bash
|
||||
moviepilot update backend
|
||||
moviepilot update backend --ref latest
|
||||
moviepilot update backend --ref v2.9.31
|
||||
moviepilot update backend --ref v3.0.0
|
||||
|
||||
moviepilot update frontend
|
||||
moviepilot update frontend --frontend-version latest
|
||||
|
||||
+1
-1
@@ -131,6 +131,6 @@ def test_recognize_prefers_explicit_id(sample_meta, monkeypatch):
|
||||
|
||||
## CI 与 PR
|
||||
|
||||
- **门禁**:`.github/workflows/test.yml` 在指向 `v2` 的 `pull_request` / `push` 及手动触发时,用 `python tests/run.py` 跑全量单测。
|
||||
- **门禁**:`.github/workflows/test.yml` 在指向 `v3` 的 `pull_request` / `push` 及手动触发时,用 `python tests/run.py` 跑全量单测。
|
||||
- **PR**:`python tests/run.py` 确认全绿、且 socket 探针零真实出站,避免把红的改动推上去空耗门禁。
|
||||
- 复现 CI 用仅安装 `requirements-dev.in` 的干净环境;`requirements.in` 只承载运行时依赖,pytest 与覆盖率插件由开发依赖入口提供。
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
moviepilot-rust~=0.2.4
|
||||
moviepilot-rust~=0.2.5
|
||||
pydantic>=2.13.4,<3.0.0
|
||||
pydantic-settings>=2.14.2,<3.0.0
|
||||
SQLAlchemy~=2.0.50
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
REPO_URL="https://github.com/jxxghp/MoviePilot.git"
|
||||
REPO_REF="v2"
|
||||
REPO_REF="v3"
|
||||
WORKDIR="$PWD"
|
||||
APP_DIR_NAME="MoviePilot"
|
||||
LINK_CLI="true"
|
||||
|
||||
@@ -29,3 +29,23 @@ def test_install_and_docker_paths_do_not_reference_v2_resources():
|
||||
assert "resources.v2" not in content
|
||||
assert "user.sites.v2.bin" not in content
|
||||
assert "resources.v3" in content
|
||||
|
||||
|
||||
def test_v3_release_workflows_use_isolated_branches_and_images():
|
||||
"""V3 正式版和 Beta 构建不得写入 V2 或无版本后缀的镜像仓库。"""
|
||||
build_workflow = (ROOT_DIR / ".github" / "workflows" / "build.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 "${{ 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 "${{ 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
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
APP_VERSION = 'v2.15.5'
|
||||
FRONTEND_VERSION = 'v2.15.5'
|
||||
APP_VERSION = 'v3.0.0'
|
||||
FRONTEND_VERSION = 'v3.0.0'
|
||||
|
||||
Reference in New Issue
Block a user