From b1331ba3fe117ac950cb14d572c70ea7597f95dd Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:33:08 +0900 Subject: [PATCH] feature(ci): use matrix for container build --- .github/workflows/container_latest.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container_latest.yml b/.github/workflows/container_latest.yml index ded3636fc..6536805db 100644 --- a/.github/workflows/container_latest.yml +++ b/.github/workflows/container_latest.yml @@ -8,6 +8,11 @@ on: jobs: build-latest: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -55,12 +60,17 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: ${{ matrix.platform }}/${{ matrix.arch }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} build-dev: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -109,6 +119,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: ${{ matrix.platform }}/${{ matrix.arch }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }}