File tree Expand file tree Collapse file tree 2 files changed +7
-28
lines changed
Expand file tree Collapse file tree 2 files changed +7
-28
lines changed Original file line number Diff line number Diff line change 33 push :
44 branches :
55 - main
6+
67jobs :
78 build-app :
89 runs-on : ubuntu-latest
@@ -12,33 +13,15 @@ jobs:
1213 - service_name : ui
1314 file : frontend/Dockerfile
1415 context : ./frontend
15- arch : amd64
16- platform : linux/amd64
17- - service_name : app
18- file : docker/Dockerfile.app
19- context : .
20- arch : amd64
21- platform : linux/amd64
22- - service_name : docreader
23- file : docker/Dockerfile.docreader
24- context : .
25- arch : amd64
26- platform : linux/amd64
27- - service_name : ui
28- file : frontend/Dockerfile
29- context : ./frontend
30- arch : arm64
31- platform : linux/arm64
16+ platform : linux/amd64,linux/arm64
3217 - service_name : app
3318 file : docker/Dockerfile.app
3419 context : .
35- arch : arm64
36- platform : linux/arm64
20+ platform : linux/amd64,linux/arm64
3721 - service_name : docreader
3822 file : docker/Dockerfile.docreader
3923 context : .
40- arch : arm64
41- platform : linux/arm64
24+ platform : linux/amd64,linux/arm64
4225 steps :
4326 - name : Checkout code
4427 uses : actions/checkout@v3
6245 platforms : ${{ matrix.platform }}
6346 file : ${{ matrix.file }}
6447 context : ${{ matrix.context }}
65- tags : ${{ secrets.DOCKERHUB_USERNAME }}/weknora-${{ matrix.service_name }}:${{ matrix.arch }}-latest
66- build-args : |
67- PLATFORM=${{ matrix.platform }}
48+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/weknora-${{ matrix.service_name }}:latest
Original file line number Diff line number Diff line change 1- ARG PLATFORM=linux/amd64
2-
31# =========================
42# 构建阶段
53# =========================
6- FROM --platform=${PLATFORM} python:3.10.18-bookworm AS builder
4+ FROM python:3.10.18-bookworm AS builder
75
86# 切换 apt 源到清华
97RUN sed -i 's@http://deb.debian.org@https://mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/debian.sources && \
@@ -63,7 +61,7 @@ RUN chmod +x /app/scripts/generate_proto.sh && bash /app/scripts/generate_proto.
6361# =========================
6462# 运行阶段
6563# =========================
66- FROM --platform=${PLATFORM} python:3.10.18-bookworm AS runner
64+ FROM python:3.10.18-bookworm AS runner
6765
6866# 切换 apt 源到清华
6967RUN sed -i 's@http://deb.debian.org@https://mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/debian.sources && \
You can’t perform that action at this time.
0 commit comments