From a33000efac327d06efddf66e38de0d5cd211d50c Mon Sep 17 00:00:00 2001 From: shinya Date: Wed, 6 Aug 2025 02:36:49 +0800 Subject: [PATCH] feat: use jsdelivr as version cache --- .github/workflows/docker-image.yml | 13 +++++++++++++ VERSION.txt | 2 +- package.json | 2 +- src/lib/version.ts | 4 ++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e811045..427a80c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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" diff --git a/VERSION.txt b/VERSION.txt index bb9e59b..181ebcf 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20250806022700 \ No newline at end of file +20250806023654 \ No newline at end of file diff --git a/package.json b/package.json index bb142f8..f276683 100644 --- a/package.json +++ b/package.json @@ -87,5 +87,5 @@ "prettier -w" ] }, - "packageManager": "pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184" + "packageManager": "pnpm@10.14.0" } diff --git a/src/lib/version.ts b/src/lib/version.ts index 11cb420..c8456fd 100644 --- a/src/lib/version.ts +++ b/src/lib/version.ts @@ -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', ];