Skip to content
Open

1 #49

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
8151bcd
feat: spam and nonsense go away
JohnsonRan Aug 5, 2025
74ae09d
docs: update README.md
JohnsonRan Aug 5, 2025
355dcae
Merge pull request #398 from JohnsonRan/noway
senshinya Aug 5, 2025
d5f7112
添加Star趋势
sky22333 Aug 5, 2025
77eb944
Merge pull request #399 from sky22333/main
senshinya Aug 5, 2025
0547254
fix: let NoMoreSpam runs on this repo
JohnsonRan Aug 5, 2025
d80bd8d
Merge pull request #403 from JohnsonRan/pull_request_target
senshinya Aug 5, 2025
4442456
feat: disable cf deployment
senshinya Aug 5, 2025
a33000e
feat: use jsdelivr as version cache
senshinya Aug 5, 2025
f94e959
feat: remove cf pages deployment guide
senshinya Aug 6, 2025
10e7bbd
feat: html unescape
senshinya Aug 6, 2025
e8bbf50
feat: add apple-touch-icon
senshinya Aug 6, 2025
06ed12b
feat: make banned user logout
senshinya Aug 6, 2025
87463f3
feat: add play page douban link
senshinya Aug 6, 2025
d3f5fe4
feat: transfer as organization repo
senshinya Aug 6, 2025
b89ac58
fix: readme docker image name
senshinya Aug 6, 2025
269bf67
fix: use custom model
JohnsonRan Aug 7, 2025
632524e
Merge pull request #415 from JohnsonRan/nice-model
senshinya Aug 7, 2025
2f897d7
feat: request wake lock when play
senshinya Aug 7, 2025
1308221
feat: fallback douban proxy
senshinya Aug 7, 2025
506eca7
fix: clear timeout
senshinya Aug 7, 2025
f52ae5b
feat: add version param to disable disk cache
senshinya Aug 8, 2025
dac0a22
feat: make douban fallback logic frontend
senshinya Aug 8, 2025
30a850f
fix: douban fallback proxy
senshinya Aug 8, 2025
ed9066e
feat: douban multilevel filter
senshinya Aug 8, 2025
d1cad71
fix: multilevel selector dropdown mobile style
senshinya Aug 9, 2025
dbdb2f8
feat: adjust version check order
senshinya Aug 9, 2025
f67af5f
feat: implement cache management and error handling in local storage
Aug 9, 2025
06c103f
fix: extend cache expiration time to two months
Aug 9, 2025
9a07c2e
feat: push PR image to ghcr too
JohnsonRan Aug 9, 2025
b9df00a
feat: add douban cdn and cors proxy
senshinya Aug 9, 2025
4038e1d
fix: build error
senshinya Aug 9, 2025
8b254f1
Merge pull request #436 from bestZwei/main
senshinya Aug 9, 2025
dd4a50c
Merge pull request #438 from JohnsonRan/pr-img
senshinya Aug 9, 2025
fc960eb
fix: only trigger image build on certain situations
JohnsonRan Aug 9, 2025
6049df3
Merge pull request #446 from JohnsonRan/fix_pr-img
senshinya Aug 9, 2025
9b27a6a
feat: add douban image proxy
senshinya Aug 9, 2025
19cc851
fix: theme-color change when switching within the same path
senshinya Aug 9, 2025
da34df1
fix: douban img3
senshinya Aug 9, 2025
ac3523a
fix: selector timing issues
senshinya Aug 9, 2025
e8bef75
feat: add anime category
senshinya Aug 9, 2025
b36d663
feat: add anime category filter
senshinya Aug 9, 2025
8847136
feat: show play source episode title
senshinya Aug 9, 2025
22dbdde
fix: episode selector style
senshinya Aug 9, 2025
b0fa66c
feat: add netlify deployment guide, fix default user options
senshinya Aug 10, 2025
246ad37
feat: avoid SITE_NAME environment
senshinya Aug 10, 2025
ecb411d
fix: backend douban api label param missing
senshinya Aug 10, 2025
d30a7cc
feat: rename direct text
senshinya Aug 10, 2025
3daf00e
feat: add version info panel
senshinya Aug 10, 2025
6d21914
fix: version check
senshinya Aug 10, 2025
de38f01
feat: semantic version check functions
senshinya Aug 10, 2025
a714d95
fix: update artplayer dependency to version 5.2.5
Aug 11, 2025
80c87cd
feat: update CHANGELOG for Artplayer upgrade to version 5.2.5
Aug 11, 2025
58d2837
chore: 更新版本号至1.0.3
Aug 11, 2025
f471fda
Merge pull request #463 from bestZwei/main
senshinya Aug 11, 2025
ecf6a65
feat: update version to 1.0.4 and enhance changelog management workflow
bestZwei Aug 11, 2025
be8ca2f
Merge branch 'main' of https://github.com/LunaTechLab/MoonTV
actions-user Aug 11, 2025
5b9f480
Merge pull request #466 from bestZwei/main
senshinya Aug 11, 2025
de35e34
docs(README): 更新Docker镜像拉取说明并添加版本标签信息
bestZwei Aug 11, 2025
34361d9
Merge branch 'main' of github.com:bestZwei/MoonTV
bestZwei Aug 11, 2025
423e889
Merge pull request #467 from bestZwei/main
senshinya Aug 11, 2025
3e68fbd
ci: implement git tag-based automated release workflow
JohnsonRan Aug 11, 2025
5de3139
chore: Bump to 1.0.5
github-actions[bot] Aug 11, 2025
308408c
Fix React Server Components CVE vulnerabilities
vercel[bot] Dec 19, 2025
1579511
Merge pull request #99 from dyzmj/vercel/react-server-components-cve-…
dyzmj Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 69 additions & 12 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
name: Build & Push Docker image

on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
pull_request_target:
branches:
- main
paths-ignore:
- '**.md'
- '.github/**'
types:
- labeled
- synchronize
workflow_run:
workflows: ['Release']
types:
- completed

workflow_dispatch:

concurrency:
Expand All @@ -21,6 +25,7 @@ permissions:
contents: write
packages: write
actions: write
pull-requests: write

jobs:
build:
Expand Down Expand Up @@ -58,11 +63,19 @@ jobs:
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5

with:
images: ghcr.io/${{ steps.lowercase.outputs.owner }}/moontv
tags: |
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
type=match,pattern=v(.*),group=1,enable=${{ startsWith(github.ref, 'refs/tags/v') }}

- name: Get latest tag
id: get_tag
run: |
latest_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/tags | jq -r '.[0].name // "latest"' | sed 's/^v//')
echo "latest_tag=$latest_tag_no_v" >> $GITHUB_ENV

- name: Build and push by digest
id: build
Expand All @@ -72,7 +85,8 @@ jobs:
file: ./Dockerfile
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ steps.lowercase.outputs.owner }}/moontv,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ steps.lowercase.outputs.owner }}/moontv:${{ env.latest_tag }}
outputs: type=image,name=ghcr.io/${{ steps.lowercase.outputs.owner }}/moontv,name-canonical=true,push=true

- name: Export digest
run: |
Expand All @@ -92,7 +106,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
if: github.event_name != 'pull_request'
steps:
- name: Download digests
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -121,10 +134,9 @@ jobs:
with:
images: ghcr.io/${{ steps.lowercase.outputs.owner }}/moontv
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
type=ref,event=pr,prefix=pr-
type=raw,value=latest,enable={{is_default_branch}}
type=match,pattern=v(.*),group=1,enable=${{ startsWith(github.ref, 'refs/tags/v') }}

- name: Create manifest list and push
working-directory: /tmp/digests
Expand All @@ -136,11 +148,43 @@ jobs:
run: |
docker buildx imagetools inspect ghcr.io/${{ steps.lowercase.outputs.owner }}/moontv:${{ steps.meta.outputs.version }}

pr-comment:
runs-on: ubuntu-latest
needs:
- merge
if: github.event_name == 'pull_request_target'
steps:
- name: Set lowercase repository owner
id: lowercase
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"

- name: Comment on PR
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `🎉 您的 PR 已构建完成!

Docker 镜像已成功构建并推送到 GitHub Container Registry。

**拉取命令:**
\`\`\`bash
docker pull ghcr.io/${{ steps.lowercase.outputs.owner }}/moontv:pr-${{ github.event.number }}
\`\`\`

**标签:** \`pr-${{ github.event.number }}\`

构建完成时间:${new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}`
});

cleanup:
runs-on: ubuntu-latest
needs:
- merge
if: always() && github.event_name != 'pull_request'
if: always() && github.event_name != 'pull_request_target'
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
Expand All @@ -149,3 +193,16 @@ jobs:
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 2
- name: Refresh VERSION.txt cache
run: |
echo "Refreshing VERSION.txt cache..."
curl -s https://purge.jsdelivr.net/gh/LunaTechLab/moontv/VERSION.txt
echo ""
echo "VERSION.txt cache refreshed successfully"
keep_minimum_runs: 2
- name: Refresh VERSION.txt cache
run: |
echo "Refreshing VERSION.txt cache..."
curl -s https://purge.jsdelivr.net/gh/LunaTechLab/moontv/VERSION.txt
echo ""
echo "VERSION.txt cache refreshed successfully"
29 changes: 29 additions & 0 deletions .github/workflows/nomore-spam.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: NoMore Spam

on:
issues:
types: [opened]
pull_request_target:
types: [opened]

permissions:
contents: read
issues: write
pull-requests: write
models: read
actions: write

jobs:
spam-detection:
runs-on: ubuntu-latest
name: NoMore Spam

steps:
- name: Fuck All the Shit
uses: JohnsonRan/nomore-spam@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ai-base-url: ${{ secrets.AI_BASE_URL }}
ai-api-key: ${{ secrets.AI_API_KEY }}
ai-model: ${{ secrets.AI_MODEL }}
blacklist: ${{ secrets.BLACKLIST }}
95 changes: 95 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Release

on:
push:
tags:
- 'v*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
packages: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Extract version from tag
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
echo "Tag: $TAG_NAME"

- name: Get tag message
id: tag_message
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_NAME=${{ steps.version.outputs.tag }}
RELEASE_BODY=$(gh release view "$TAG_NAME" --json body -q .body || echo "")
printf '%s\n' "$RELEASE_BODY" > /tmp/tag_message.txt
echo "Tag message saved to /tmp/tag_message.txt"
echo "Tag message content:"
cat /tmp/tag_message.txt

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Update version files and generate changelog
run: |
CURRENT_DATE=$(date +%Y-%m-%d)
VERSION="${{ steps.version.outputs.version }}"
TAG_MESSAGE=$(cat /tmp/tag_message.txt)
echo "Updating CHANGELOG file..."
{
echo "## [$VERSION] - $CURRENT_DATE"
echo ""
cat /tmp/tag_message.txt
echo ""
} > /tmp/new_entry.txt

if [ -f "CHANGELOG" ]; then
cp CHANGELOG CHANGELOG.bak
cat /tmp/new_entry.txt CHANGELOG.bak > CHANGELOG
else
cp /tmp/new_entry.txt CHANGELOG
fi
echo "✅ Updated CHANGELOG with new entry for version $VERSION"

echo "Updating VERSION.txt..."
echo "$VERSION" > VERSION.txt
echo "✅ Updated VERSION.txt to $VERSION"

echo "Generating changelog TypeScript file..."
node scripts/convert-changelog.js

echo "Updating version.ts..."
sed -i "s/const CURRENT_VERSION = '[^']*';/const CURRENT_VERSION = '$VERSION';/" src/lib/version.ts
echo "✅ Updated version.ts to $VERSION"

- name: Commit generated files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add CHANGELOG VERSION.txt src/lib/changelog.ts src/lib/version.ts
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: Bump to ${{ steps.version.outputs.version }}"
git push origin HEAD:main
echo "Committed and pushed generated files"
fi
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
id: sync
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1
with:
upstream_sync_repo: senshinya/MoonTV
upstream_sync_repo: LunaTechLab/MoonTV
upstream_sync_branch: main
target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 0 additions & 7 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# 生成版本号
pnpm gen:version

# 自动添加修改的版本文件
git add src/lib/version.ts
git add VERSION.txt

npx lint-staged
38 changes: 38 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## [1.0.5] - 2025-08-11

### Changed
- 实现基于 Git 标签的自动 Release 工作流

## [1.0.4] - 2025-08-12

### Added
- 优化版本管理工作流,实现单点修改

### Changed
- 版本号现在从CHANGELOG自动提取,无需手动维护VERSION.txt

## [1.0.3] - 2025-08-11

### Changed

- 升级播放器 Artplayer 至版本 5.2.5

## [1.0.2] - 2025-08-11

### Changed

- 版本号比较机制恢复为数字比较,仅当最新版本大于本地版本时才认为有更新
- [运维] 自动替换 version.ts 中的版本号为 VERSION.txt 中的版本号

## [1.0.1] - 2025-08-11

### Fixed

- 修复版本检查功能,只要与最新版本号不一致即认为有更新

## [1.0.0] - 2025-08-10

### Added

- 基于 Semantic Versioning 的版本号机制
- 版本信息面板,展示本地变更日志和远程更新日志
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 senshinya
Copyright (c) 2025 LunaTechLab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading