From b4ac57eb1ee892e91b9d6327f75dfdf584f9039c Mon Sep 17 00:00:00 2001 From: Thomas Carmet <8408330+tcarmet@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:48:46 -0700 Subject: [PATCH] Support platforms as input for docker-build (#67) --- .github/workflows/docker-build.yaml | 8 ++++++++ .github/workflows/tests.yaml | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 69cacf0..24d55bb 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -55,6 +55,9 @@ on: secrets: required: false type: string + platforms: + required: false + type: string secrets: REGISTRY_LOGIN: required: false @@ -78,6 +81,10 @@ jobs: with: lfs: ${{ inputs.lfs }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + if: inputs.platforms + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -102,3 +109,4 @@ jobs: build-args: ${{ inputs.build-args }} file: ${{ env.FILE }} secrets: ${{ inputs.secrets }} + platforms: ${{ inputs.platforms }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 532467c..20c061a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -20,6 +20,12 @@ jobs: secrets: | my_secret=toto my_other_secret=tata + docker-build-platforms: + uses: ./.github/workflows/docker-build.yaml + with: + context: tests/docker + name: test-platform + platforms: linux/amd64,linux/arm64 trivy: needs: docker-build