feat: 更新发布配置和文档,修改 Docker 镜像地址为 katelya77/KatelyaTV

This commit is contained in:
katelya
2025-09-02 15:16:51 +08:00
parent d410bde28c
commit d268fa7dd5
6 changed files with 109 additions and 256 deletions
+12 -12
View File
@@ -29,8 +29,8 @@ body-template: |
#### Docker 部署 #### Docker 部署
```bash ```bash
docker pull ghcr.io/senshinya/moontv:v$RESOLVED_VERSION docker pull ghcr.io/katelya77/katelyatv:v$RESOLVED_VERSION
docker run -d --name moontv -p 3000:3000 --env PASSWORD=your_password ghcr.io/senshinya/moontv:v$RESOLVED_VERSION docker run -d --name katelyatv -p 3000:3000 --env PASSWORD=your_password ghcr.io/katelya77/katelyatv:v$RESOLVED_VERSION
``` ```
#### 环境变量更新 #### 环境变量更新
@@ -40,10 +40,10 @@ body-template: |
查看 [CHANGELOG.md](CHANGELOG.md) 了解详细的更新历史。 查看 [CHANGELOG.md](CHANGELOG.md) 了解详细的更新历史。
### 🔗 相关链接 ### 🔗 相关链接
- [项目主页](https://github.com/senshinya/moontv) - [项目主页](https://github.com/katelya77/KatelyaTV)
- [在线演示](https://moontv.vercel.app) - [在线演示](https://katelyatv.vercel.app)
- [问题反馈](https://github.com/senshinya/moontv/issues) - [问题反馈](https://github.com/katelya77/KatelyaTV/issues)
- [功能建议](https://github.com/senshinya/moontv/discussions) - [功能建议](https://github.com/katelya77/KatelyaTV/discussions)
# 发布配置 # 发布配置
prerelease: false prerelease: false
@@ -124,8 +124,8 @@ template: |
1. **Docker 部署**(推荐) 1. **Docker 部署**(推荐)
```bash ```bash
docker pull ghcr.io/senshinya/moontv:v$RESOLVED_VERSION docker pull ghcr.io/katelya77/katelyatv:v$RESOLVED_VERSION
docker run -d --name moontv -p 3000:3000 --env PASSWORD=your_password ghcr.io/senshinya/moontv:v$RESOLVED_VERSION docker run -d --name katelyatv -p 3000:3000 --env PASSWORD=your_password ghcr.io/katelya77/katelyatv:v$RESOLVED_VERSION
``` ```
2. **Vercel 部署** 2. **Vercel 部署**
@@ -152,7 +152,7 @@ template: |
## 🔗 相关资源 ## 🔗 相关资源
- [项目文档](https://github.com/senshinya/moontv#readme) - [项目文档](https://github.com/katelya77/KatelyaTV#readme)
- [问题反馈](https://github.com/senshinya/moontv/issues) - [问题反馈](https://github.com/katelya77/KatelyaTV/issues)
- [功能讨论](https://github.com/senshinya/moontv/discussions) - [功能讨论](https://github.com/katelya77/KatelyaTV/discussions)
- [贡献指南](https://github.com/senshinya/moontv/blob/main/CONTRIBUTING.md) - [贡献指南](https://github.com/katelya77/KatelyaTV/blob/main/CONTRIBUTING.md)
+40 -187
View File
@@ -19,31 +19,22 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '18' node-version: '18'
# 修改这里:改为 pnpm 或者移除 cache 配置
# cache: 'npm' # 删除这行,因为使用的是 pnpm
- name: Setup pnpm - name: Setup pnpm
uses: pnpm/action-setup@v2 uses: pnpm/action-setup@v2
with: with:
version: 8 version: 8
# 添加 pnpm 缓存配置
run_install: false run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache - name: Setup pnpm cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ${{ env.STORE_PATH }} path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: | restore-keys: |
${{ runner.os }}-pnpm-store- ${{ runner.os }}-pnpm-store-
@@ -53,20 +44,13 @@ jobs:
- name: Build project - name: Build project
run: pnpm run build run: pnpm run build
env:
PASSWORD: ${{ secrets.PASSWORD }}
- name: Create Release - name: Create Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
files: | files: |
.next/**/*
public/**/*
package.json package.json
README.md pnpm-lock.yaml
CHANGELOG.md
LICENSE
config.json
next.config.js next.config.js
tailwind.config.ts tailwind.config.ts
tsconfig.json tsconfig.json
@@ -75,7 +59,8 @@ jobs:
generate_release_notes: true generate_release_notes: true
draft: false draft: false
prerelease: false prerelease: false
title: '🎉 Release ${{ github.ref_name }}' tag_name: ${{ github.ref_name }}
name: '🎉 Release ${{ github.ref_name }}'
body: | body: |
## 🎉 新版本发布 ## 🎉 新版本发布
@@ -86,21 +71,20 @@ jobs:
#### Docker 部署(推荐) #### Docker 部署(推荐)
```bash ```bash
docker pull ghcr.io/senshinya/moontv:${{ github.ref_name }} docker pull ghcr.io/katelya77/katelyatv:${{ github.ref_name }}
docker run -d --name moontv -p 3000:3000 --env PASSWORD=your_password ghcr.io/senshinya/moontv:${{ github.ref_name }} docker run -d --name katelyatv -p 3000:3000 --env PASSWORD=your_password ghcr.io/katelya77/katelyatv:${{ github.ref_name }}
``` ```
#### Vercel 部署
- Fork 本仓库
- 在 Vercel 中导入项目
- 设置环境变量 PASSWORD
- 自动部署完成
#### Cloudflare Pages 部署 #### Cloudflare Pages 部署
- Fork 本仓库 - Fork 本仓库
- 在 Cloudflare Pages 中导入项目 - 在 Cloudflare Pages 中导入项目
- 设置构建命令:`pnpm run pages:build` - 构建命令:`pnpm pages:build`
- 配置环境变量 - 输出目录:`.vercel/output/static`
#### Vercel 部署
- Fork 本仓库
- 在 Vercel 中导入项目
- 构建命令:`pnpm run build`
### 📋 环境变量 ### 📋 环境变量
@@ -114,10 +98,10 @@ jobs:
### 🔗 相关资源 ### 🔗 相关资源
- [项目文档](https://github.com/senshinya/moontv#readme) - [项目文档](https://github.com/katelya77/KatelyaTV#readme)
- [问题反馈](https://github.com/senshinya/moontv/issues) - [问题反馈](https://github.com/katelya77/KatelyaTV/issues)
- [功能讨论](https://github.com/senshinya/moontv/discussions) - [功能讨论](https://github.com/katelya77/KatelyaTV/discussions)
- [贡献指南](https://github.com/senshinya/moontv/blob/main/CONTRIBUTING.md) - [贡献指南](https://github.com/katelya77/KatelyaTV/blob/main/CONTRIBUTING.md)
### 📝 更新日志 ### 📝 更新日志
@@ -127,166 +111,35 @@ jobs:
**注意**: 本项目仅供学习和个人使用,请遵守当地法律法规。 **注意**: 本项目仅供学习和个人使用,请遵守当地法律法规。
docker:
needs: release
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image - name: Build and Push Docker Image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
push: true push: true
tags: | tags: |
ghcr.io/senshinya/moontv:${{ github.ref_name }} ghcr.io/katelya77/katelyatv:${{ github.ref_name }}
ghcr.io/senshinya/moontv:latest ghcr.io/katelyatv/katelyatv:latest
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
- name: Update Release with Docker Info
uses: softprops/action-gh-release@v1
with:
body: |
## 🎉 新版本发布
**版本号**: ${{ github.ref_name }}
**发布日期**: ${{ github.event.head_commit.timestamp }}
### 🐳 Docker 镜像
Docker 镜像已自动构建并推送到 GitHub Container Registry
```bash
# 拉取指定版本
docker pull ghcr.io/senshinya/moontv:${{ github.ref_name }}
# 拉取最新版本
docker pull ghcr.io/senshinya/moontv:latest
# 运行容器
docker run -d --name moontv -p 3000:3000 --env PASSWORD=your_password ghcr.io/senshinya/moontv:${{ github.ref_name }}
```
### 🚀 其他部署方式
#### Vercel 部署
- Fork 本仓库
- 在 Vercel 中导入项目
- 设置环境变量 PASSWORD
- 自动部署完成
#### Cloudflare Pages 部署
- Fork 本仓库
- 在 Cloudflare Pages 中导入项目
- 设置构建命令:`pnpm run pages:build`
- 配置环境变量
### 📋 环境变量
| 变量 | 说明 | 默认值 |
|------|------|--------|
| PASSWORD | 访问密码 | 必填 |
| NEXT_PUBLIC_STORAGE_TYPE | 存储类型 | localstorage |
| USERNAME | 管理员账号 | 空 |
更多环境变量请查看 [README.md](README.md)
### 🔗 相关资源
- [项目文档](https://github.com/senshinya/moontv#readme)
- [问题反馈](https://github.com/senshinya/moontv/issues)
- [功能讨论](https://github.com/senshinya/moontv/discussions)
- [贡献指南](https://github.com/senshinya/moontv/blob/main/CONTRIBUTING.md)
### 📝 更新日志
查看 [CHANGELOG.md](CHANGELOG.md) 了解详细的更新历史。
---
**注意**: 本项目仅供学习和个人使用,请遵守当地法律法规。
update_existing_release: true
- name: Create Discussion
uses: actions/github-script@v7
with:
script: |
const { data: discussions } = await github.rest.discussions.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `🎉 ${context.ref_name} 版本发布讨论`,
body: `## 🎉 ${context.ref_name} 版本发布成功!
新版本已成功发布,包含以下更新:
### 🚀 主要特性
- 观看历史记录功能
- 多源聚合搜索
- PWA 支持
- 深色模式
- 多用户系统
### 🐳 Docker 部署
\`\`\`bash
docker pull ghcr.io/senshinya/moontv:${context.ref_name}
docker run -d --name moontv -p 3000:3000 --env PASSWORD=your_password ghcr.io/senshinya/moontv:${context.ref_name}
\`\`\`
### 📋 环境变量
| 变量 | 说明 | 默认值 |
|------|------|--------|
| PASSWORD | 访问密码 | 必填 |
| NEXT_PUBLIC_STORAGE_TYPE | 存储类型 | localstorage |
| USERNAME | 管理员账号 | 空 |
### 🔗 相关链接
- [Release 页面](https://github.com/${context.repo.owner}/${context.repo.repo}/releases/tag/${context.ref_name})
- [项目文档](https://github.com/${context.repo.owner}/${context.repo.repo}#readme)
- [问题反馈](https://github.com/${context.repo.owner}/${context.repo.repo}/issues)
---
欢迎在此讨论新版本的使用体验、问题反馈和功能建议!
**注意**: 本项目仅供学习和个人使用,请遵守当地法律法规。`,
category: 'ANNOUNCEMENT'
});
console.log(`Discussion created: ${discussions.html_url}`);
- name: Comment on Issues
uses: actions/github-script@v7
with:
script: |
// 查找与当前版本相关的 issue
const { data: issues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: ['enhancement', 'bug', 'feature']
});
// 在相关 issue 下添加评论
for (const issue of issues) {
if (issue.title.toLowerCase().includes('release') ||
issue.title.toLowerCase().includes('version') ||
issue.body?.toLowerCase().includes('release') ||
issue.body?.toLowerCase().includes('version')) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: `🎉 好消息!${context.ref_name} 版本已经发布,可能解决了您提到的问题。
请查看 [Release 页面](https://github.com/${context.repo.owner}/${context.repo.repo}/releases/tag/${context.ref_name}) 了解详细更新内容。
如果问题仍然存在,请提供更多详细信息,我们会继续关注。`
});
console.log(`Commented on issue #${issue.number}`);
}
}
- name: Notify Success
run: |
echo "🎉 Release ${{ github.ref_name }} 发布成功!"
echo "📦 Docker 镜像: ghcr.io/senshinya/moontv:${{ github.ref_name }}"
echo "🔗 Release 页面: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}"
echo "📝 更新日志: https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md"
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
id: sync id: sync
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1 uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1
with: with:
upstream_sync_repo: senshinya/MoonTV upstream_sync_repo: katelya77/KatelyaTV
upstream_sync_branch: main upstream_sync_branch: main
target_sync_branch: main target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }} target_repo_token: ${{ secrets.GITHUB_TOKEN }}
+2 -2
View File
@@ -49,7 +49,6 @@
- **🔐 隐私保护**:本地部署,数据完全掌控 - **🔐 隐私保护**:本地部署,数据完全掌控
- **🌍 国际化**:多语言支持(规划中) - **🌍 国际化**:多语言支持(规划中)
## 📋 技术栈 ## 📋 技术栈
| 分类 | 主要依赖 | | 分类 | 主要依赖 |
@@ -360,9 +359,10 @@ docker run --rm -v katelyatv-redis-data:/data -v $(pwd):/backup alpine tar xzf /
在构建设置页面填写: 在构建设置页面填写:
- **构建命令**: `npm install && npm run pages:build` - **构建命令**: `pnpm install && pnpm pages:build`
- **构建输出目录**: `.vercel/output/static` - **构建输出目录**: `.vercel/output/static`
- **Root directory**: `./`(默认) - **Root directory**: `./`(默认)
- **Node.js 版本**: `18`(推荐)
#### 第三步:设置兼容性 #### 第三步:设置兼容性
+6 -6
View File
@@ -168,8 +168,8 @@ function updateChangelog(newVersion, type) {
#### Docker 部署 #### Docker 部署
\`\`\`bash \`\`\`bash
docker pull ghcr.io/senshinya/moontv:v${newVersion} docker pull ghcr.io/katelya77/katelyatv:v${newVersion}
docker run -d --name moontv -p 3000:3000 --env PASSWORD=your_password ghcr.io/senshinya/moontv:v${newVersion} docker run -d --name katelyatv -p 3000:3000 --env PASSWORD=your_password ghcr.io/katelya77/katelyatv:v${newVersion}
\`\`\` \`\`\`
#### 环境变量更新 #### 环境变量更新
@@ -179,10 +179,10 @@ docker run -d --name moontv -p 3000:3000 --env PASSWORD=your_password ghcr.io/se
查看 [CHANGELOG.md](CHANGELOG.md) 了解详细的更新历史。 查看 [CHANGELOG.md](CHANGELOG.md) 了解详细的更新历史。
### 🔗 相关链接 ### 🔗 相关链接
- [项目主页](https://github.com/senshinya/moontv) - [项目主页](https://github.com/katelya77/KatelyaTV)
- [在线演示](https://moontv.vercel.app) - [在线演示](https://katelyatv.vercel.app)
- [问题反馈](https://github.com/senshinya/moontv/issues) - [问题反馈](https://github.com/katelya77/KatelyaTV/issues)
- [功能建议](https://github.com/senshinya/moontv/discussions) - [功能建议](https://github.com/katelya77/KatelyaTV/discussions)
`; `;
+3 -3
View File
@@ -11,14 +11,14 @@ export enum UpdateStatus {
FETCH_FAILED = 'fetch_failed', // 获取失败 FETCH_FAILED = 'fetch_failed', // 获取失败
} }
// 远程版本检查URL配置(支持环境变量覆盖,并保留 MoonTV 上游作为后备 // 远程版本检查URL配置(支持环境变量覆盖)
const ENV_PRIMARY = process.env.NEXT_PUBLIC_VERSION_URL_PRIMARY; const ENV_PRIMARY = process.env.NEXT_PUBLIC_VERSION_URL_PRIMARY;
const ENV_BACKUP = process.env.NEXT_PUBLIC_VERSION_URL_BACKUP; const ENV_BACKUP = process.env.NEXT_PUBLIC_VERSION_URL_BACKUP;
const VERSION_CHECK_URLS = [ const VERSION_CHECK_URLS = [
ENV_PRIMARY, ENV_PRIMARY,
ENV_BACKUP, ENV_BACKUP,
'https://ghfast.top/raw.githubusercontent.com/senshinya/MoonTV/main/VERSION.txt', 'https://ghfast.top/raw.githubusercontent.com/katelya77/KatelyaTV/main/VERSION.txt',
'https://raw.githubusercontent.com/senshinya/MoonTV/main/VERSION.txt', 'https://raw.githubusercontent.com/katelya77/KatelyaTV/main/VERSION.txt',
].filter(Boolean) as string[]; ].filter(Boolean) as string[];
/** /**