修复: 尝试下载当前版本的dashboard,如果下载失败(开发版本),回退为下载最新版本

This commit is contained in:
LIghtJUNction
2026-03-15 18:18:23 +08:00
parent 0b534f65c2
commit c18165909e
2 changed files with 14 additions and 8 deletions
+6 -6
View File
@@ -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
+8 -2
View File
@@ -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