build: stable docker linux/armv7 arch support

This commit is contained in:
Fu Diwei
2025-09-10 21:07:36 +08:00
parent 4c933c05ab
commit d51a4f69ad
2 changed files with 43 additions and 8 deletions
+39 -5
View File
@@ -14,7 +14,34 @@ on:
default: "latest"
jobs:
prepare-ui:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.19.0
- name: Build UI
run: |
echo "VITE_APP_VERSION=${GITHUB_REF#refs/tags/}" > ./ui/.env
npm --prefix=./ui ci
npm --prefix=./ui run build
- name: Upload UI build artifacts
uses: actions/upload-artifact@v4
with:
name: ui-build
path: ./ui/dist
retention-days: 1
build-and-push:
needs: prepare-ui
runs-on: ubuntu-latest
steps:
- name: Checkout code
@@ -52,15 +79,22 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Inject tag version of UI
run: |
echo "VITE_APP_VERSION=${GITHUB_REF#refs/tags/}" > ./ui/.env
# - name: Inject tag version of UI
# run: |
# echo "VITE_APP_VERSION=${GITHUB_REF#refs/tags/}" > ./ui/.env
- name: Download UI build artifacts
uses: actions/download-artifact@v4
with:
name: ui-build
path: ./ui/dist
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
# file: ./Dockerfile
file: ./Dockerfile.gh
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
+4 -3
View File
@@ -77,9 +77,9 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Inject tag version of UI
run: |
echo "VITE_APP_VERSION=${GITHUB_REF#refs/tags/}" > ./ui/.env
# - name: Inject tag version of UI
# run: |
# echo "VITE_APP_VERSION=${GITHUB_REF#refs/tags/}" > ./ui/.env
- name: Download UI build artifacts
uses: actions/download-artifact@v4
@@ -91,6 +91,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
# file: ./Dockerfile.gh
file: ./Dockerfile.gh
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true