+ platforms

This commit is contained in:
Max 2022-02-13 19:06:36 +08:00
parent 9dea6c8885
commit dc1feb03de
3 changed files with 12 additions and 5 deletions

View file

@ -1,7 +1,10 @@
name: Build and push docker images
# Only trigger, when the Release Linux workflow succeeded
on:
push:
branches: [main]
paths:
- ".github/workflows/docker.yml"
workflow_run:
workflows: ["Release Linux"]
types:
@ -40,6 +43,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ./docker/development
platforms: linux/amd64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=amd64
@ -50,6 +54,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ./docker/development
platforms: linux/arm64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=arm64
@ -60,6 +65,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ./docker/production
platforms: linux/amd64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=amd64
@ -70,6 +76,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ./docker/production
platforms: linux/arm64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=arm64

View file

@ -6,8 +6,8 @@
# -t yaoapp/yao-dev:${VERSION}-${ARCH} .
#
# Build:
# docker build --build-arg VERSION=0.9.1 --build-arg ARCH=amd64 -t yaoapp/yao:0.9.1-amd64-dev .
# docker build --build-arg VERSION=0.9.1 --build-arg ARCH=arm64 -t yaoapp/yao:0.9.1-arm64-dev .
# docker build --platform linux/amd64 --build-arg VERSION=0.9.1 --build-arg ARCH=amd64 -t yaoapp/yao:0.9.1-amd64-dev .
# docker build --platform linux/arm64 --build-arg VERSION=0.9.1 --build-arg ARCH=arm64 -t yaoapp/yao:0.9.1-arm64-dev .
#
# Tests:
# docker run --rm yaoapp/yao:0.9.1-amd64-dev yao version

View file

@ -6,8 +6,8 @@
# -t yaoapp/yao-dev:${VERSION}-${ARCH} .
#
# Build:
# docker build --build-arg VERSION=0.9.1 --build-arg ARCH=amd64 -t yaoapp/yao:0.9.1-amd64 .
# docker build --build-arg VERSION=0.9.1 --build-arg ARCH=arm64 -t yaoapp/yao:0.9.1-arm64 .
# docker build --platform linux/amd64 --build-arg VERSION=0.9.1 --build-arg ARCH=amd64 -t yaoapp/yao:0.9.1-amd64 .
# docker build --platform linux/arm64 --build-arg VERSION=0.9.1 --build-arg ARCH=arm64 -t yaoapp/yao:0.9.1-arm64 .
#
# Tests:
# docker run --rm yaoapp/yao:0.9.1-amd64 yao version