mirror of
https://github.com/xxnuo/MTranServer.git
synced 2026-06-06 22:33:43 +08:00
fix: docker build
Update docker.yml
This commit is contained in:
45
.github/workflows/docker.yml
vendored
45
.github/workflows/docker.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
- name: Extract metadata (Standard)
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
@@ -57,6 +57,19 @@ jobs:
|
||||
type=semver,pattern={{major}},value=${{ steps.latest_tag.outputs.tag }}
|
||||
type=raw,value=latest
|
||||
|
||||
- name: Extract metadata (Legacy)
|
||||
id: meta-legacy
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
xxnuo/mtranserver
|
||||
ghcr.io/xxnuo/mtranserver
|
||||
tags: |
|
||||
type=semver,pattern={{version}},value=${{ steps.latest_tag.outputs.tag }},suffix=-legacy
|
||||
type=semver,pattern={{major}}.{{minor}},value=${{ steps.latest_tag.outputs.tag }},suffix=-legacy
|
||||
type=semver,pattern={{major}},value=${{ steps.latest_tag.outputs.tag }},suffix=-legacy
|
||||
type=raw,value=legacy
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: |
|
||||
@@ -67,20 +80,7 @@ jobs:
|
||||
fi
|
||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Build UI
|
||||
run: |
|
||||
cd ui
|
||||
bun install --frozen-lockfile
|
||||
bun run build
|
||||
echo "✓ UI build complete"
|
||||
ls -lh dist/
|
||||
|
||||
- name: Build and push Docker image
|
||||
- name: Build and push (Standard - AVX2)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
@@ -93,3 +93,18 @@ jobs:
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
provenance: false
|
||||
|
||||
- name: Build and push (Legacy - No AVX2)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta-legacy.outputs.tags }}
|
||||
labels: ${{ steps.meta-legacy.outputs.labels }}
|
||||
build-args: |
|
||||
VERSION=${{ steps.version.outputs.version }}
|
||||
BUILD_VARIANT=legacy
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
provenance: false
|
||||
Reference in New Issue
Block a user