fix(frontend): 同步关于页版本号

This commit is contained in:
techotaku39
2026-05-26 15:54:05 +08:00
parent f2d8ece0c1
commit 9d1a7cd699
6 changed files with 42 additions and 1 deletions

View File

@@ -42,6 +42,16 @@ jobs:
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}
- name: Resolve app version
id: app-version
shell: bash
run: |
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
else
echo "version=" >> "$GITHUB_OUTPUT"
fi
- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
@@ -50,6 +60,8 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VITE_APP_VERSION=${{ steps.app-version.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64