mirror of
https://github.com/certimate-go/certimate.git
synced 2026-09-24 23:10:13 +08:00
build: stable docker linux/armv7 arch support
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user