From 7b56a6400d12ae0f1693d0a0b2d46128544cdca4 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:36:32 +0900 Subject: [PATCH] fix(ci): use matrix for all container runs --- .github/workflows/container_release.yml | 14 ++++++++++++-- .github/workflows/container_test.yml | 7 ++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/container_release.yml b/.github/workflows/container_release.yml index ba4d2eeb9..a0cbbbb68 100644 --- a/.github/workflows/container_release.yml +++ b/.github/workflows/container_release.yml @@ -9,6 +9,11 @@ on: jobs: build-default: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -59,11 +64,16 @@ 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 }} build-large: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -114,6 +124,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build_large - 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 }} diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml index a2e94b7bb..410d1d21a 100644 --- a/.github/workflows/container_test.yml +++ b/.github/workflows/container_test.yml @@ -12,6 +12,11 @@ concurrency: jobs: build-test: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -44,6 +49,6 @@ 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 }}