feat: use jsdelivr as version cache

This commit is contained in:
shinya
2025-08-06 02:36:49 +08:00
parent 44424564fc
commit a33000efac
4 changed files with 17 additions and 4 deletions

View File

@@ -149,3 +149,16 @@ jobs:
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 2
version-cache-refresh:
runs-on: ubuntu-latest
needs:
- cleanup
if: always() && github.event_name != 'pull_request'
steps:
- name: Refresh VERSION.txt cache
run: |
echo "Refreshing VERSION.txt cache..."
curl -s https://purge.jsdelivr.net/gh/senshinya/moontv/VERSION.txt
echo ""
echo "VERSION.txt cache refreshed successfully"

View File

@@ -1 +1 @@
20250806022700
20250806023654

View File

@@ -87,5 +87,5 @@
"prettier -w"
]
},
"packageManager": "pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184"
"packageManager": "pnpm@10.14.0"
}

View File

@@ -2,7 +2,7 @@
'use client';
const CURRENT_VERSION = '20250806022700';
const CURRENT_VERSION = '20250806023654';
// 版本检查结果枚举
export enum UpdateStatus {
@@ -13,7 +13,7 @@ export enum UpdateStatus {
// 远程版本检查URL配置
const VERSION_CHECK_URLS = [
'https://ghfast.top/raw.githubusercontent.com/senshinya/MoonTV/main/VERSION.txt',
'https://cdn.jsdelivr.net/gh/senshinya/moontv/VERSION.txt',
'https://raw.githubusercontent.com/senshinya/MoonTV/main/VERSION.txt',
];