From 3c1fce03236cd9197c4b0adde0293724a663843d Mon Sep 17 00:00:00 2001 From: Jan Collijs Date: Wed, 20 Nov 2024 19:11:31 +0100 Subject: [PATCH] feat(ci): introducing parameterized DOCKERHUB_PLATFORMS --- .github/workflows/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 92243ee..6734812 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,11 @@ on: tags: - '*' workflow_call: + inputs: + platforms: + required: false + type: string + default: "linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64" secrets: DOCKERHUB_TOKEN: required: true @@ -13,6 +18,7 @@ on: env: DOCKERHUB_USERNAME: ${{ vars.DOCKERHUB_USERNAME }} DOCKERHUB_REPOSITORY: ${{ vars.DOCKERHUB_REPOSITORY }} + DOCKERHUB_PLATFORMS: ${{ inputs.platforms}} jobs: test: @@ -55,7 +61,7 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + platforms: ${{ env.DOCKERHUB_PLATFORMS }} push: true tags: | ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPOSITORY }}:latest