From 4248456ab47db4c483b0c1fb193978f233f9a665 Mon Sep 17 00:00:00 2001 From: dennisvang <29799340+dennisvang@users.noreply.github.com> Date: Wed, 12 Feb 2025 15:30:49 +0100 Subject: [PATCH] add context and file inputs for docker-publish --- .github/workflows/docker-publish.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 12dbbad..edd7000 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -20,6 +20,16 @@ on: description: 'Determines if the resulting Docker image is pushed to Docker Hub' required: true type: boolean + context: + description: 'Docker build context' + required: false + default: '.' + type: string + file: + description: 'Path to Dockerfile, e.g. "./Dockerfile"' + required: false + default: './Dockerfile' + type: string jobs: build: @@ -67,9 +77,9 @@ jobs: name: Build and push Docker image uses: docker/build-push-action@v6 with: - context: . + context: ${{ inputs.context }} # https://docs.docker.com/build/concepts/dockerfile/#filename - file: ./Dockerfile + file: ${{ inputs.file }} platforms: linux/amd64,linux/arm64 push: ${{ inputs.push }} tags: ${{ steps.meta.outputs.tags }}