feat(docker): allow for docker release builds to be multi-platform (#27055)

This commit is contained in:
Maxime Beauchemin
2024-02-08 20:58:36 -08:00
committed by GitHub
parent 5951f6ceb6
commit 13915bbb54
4 changed files with 72 additions and 53 deletions

View File

@@ -2,7 +2,7 @@ name: Docker Publish Release
on:
release:
types: [published]
types: [published, edited]
# Can be triggered manually
workflow_dispatch:
@@ -43,14 +43,6 @@ jobs:
strategy:
matrix:
build_preset: ["dev", "lean", "py310", "websocket", "dockerize"]
platform: ["linux/amd64", "linux/arm64"]
exclude:
# disabling because slow! no python wheels for arm/py39 and
# QEMU is slow!
- build_preset: "dev"
platform: "linux/arm64"
- build_preset: "lean"
platform: "linux/arm64"
fail-fast: false
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
@@ -88,8 +80,10 @@ jobs:
EVENT="release"
fi
pip install click
# Make a multi-platform image
./scripts/build_docker.py \
${{ matrix.build_preset }} \
"$EVENT" \
--build_context_ref "$RELEASE" \
--platform ${{ matrix.platform }} $FORCE_LATEST
--build_context_ref "$RELEASE" $FORCE_LATEST \
--platform "linux/arm64" \
--platform "linux/amd64"