From c18165909ebcaddbc8298fd5aa7032bf7e102a84 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Sun, 15 Mar 2026 18:18:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=20=E5=B0=9D?= =?UTF-8?q?=E8=AF=95=E4=B8=8B=E8=BD=BD=E5=BD=93=E5=89=8D=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E7=9A=84dashboard,=E5=A6=82=E6=9E=9C=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=EF=BC=88=E5=BC=80=E5=8F=91=E7=89=88=E6=9C=AC?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E5=9B=9E=E9=80=80=E4=B8=BA=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/smoke_test.yml | 12 ++++++------ main.py | 10 ++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 15571867f..52b9a29b7 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -5,9 +5,9 @@ on: branches: - master paths-ignore: - - 'README*.md' - - 'changelogs/**' - - 'dashboard/**' + - "README*.md" + - "changelogs/**" + - "dashboard/**" pull_request: workflow_dispatch: @@ -16,7 +16,7 @@ jobs: name: Run smoke tests runs-on: ubuntu-latest timeout-minutes: 10 - + steps: - name: Checkout uses: actions/checkout@v6 @@ -26,8 +26,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.12' - + python-version: "3.12" + - name: Install UV package manager run: | pip install uv diff --git a/main.py b/main.py index 1cc900982..1c19fa9b6 100644 --- a/main.py +++ b/main.py @@ -94,8 +94,14 @@ async def check_dashboard_files(webui_dir: str | None = None): try: await download_dashboard(version=f"v{VERSION}", latest=False) except Exception as e: - logger.critical(f"下载管理面板文件失败: {e}。") - return None + logger.warning( + f"下载指定版本(v{VERSION})的管理面板文件失败: {e},尝试下载最新版本。" + ) + try: + await download_dashboard(latest=True) + except Exception as e: + logger.critical(f"下载管理面板文件失败: {e}。") + return None logger.info("管理面板下载完成。") return data_dist_path