Skip to content

Commit

Permalink
feat: fast build linux/arm64 frontend (songquanpeng#1663)
Browse files Browse the repository at this point in the history
* feat: fast build linux/arm64 frontend

* fix: dockerfile as replace to AS

* fix: trim space
  • Loading branch information
zijiren233 authored and mxdlzg committed Oct 15, 2024
1 parent 88f1c54 commit 8451b39
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 73 deletions.
69 changes: 0 additions & 69 deletions .github/workflows/docker-image-arm64.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docker image (amd64, English)
name: Publish Docker image (English)

on:
push:
Expand Down Expand Up @@ -34,6 +34,13 @@ jobs:
- name: Translate
run: |
python ./i18n/translate.py --repository_path . --json_file_path ./i18n/en.json
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
Expand All @@ -51,6 +58,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docker image (amd64)
name: Publish Docker image

on:
push:
Expand Down Expand Up @@ -28,12 +28,18 @@ jobs:
REPO_URL=$(git config --get remote.origin.url)
if [[ $REPO_URL == *"pro" ]]; then
exit 1
fi
fi
- name: Save version info
run: |
git describe --tags --always > VERSION && cat VERSION
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
Expand Down Expand Up @@ -88,6 +94,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16 as builder
FROM --platform=$BUILDPLATFORM node:16 AS builder

WORKDIR /web
COPY ./VERSION .
Expand Down

0 comments on commit 8451b39

Please sign in to comment.