From 34dabfb8004bd582995b87ef9eacd8ac439e10fb Mon Sep 17 00:00:00 2001 From: Campbell Allen Date: Wed, 20 Jul 2022 16:28:42 +0100 Subject: [PATCH] add dockerfile input variable (#31) allow the dockerfile to be specified as an input to the build and push action, https://github.com/docker/build-push-action#inputs --- .github/workflows/build_and_push_image.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build_and_push_image.yaml b/.github/workflows/build_and_push_image.yaml index ed71cd0..9ed7810 100644 --- a/.github/workflows/build_and_push_image.yaml +++ b/.github/workflows/build_and_push_image.yaml @@ -12,6 +12,11 @@ on: description: 'HEAD commit hash' required: true type: string + file: + description: 'The dockerfile to build the image against' + required: false + default: 'Dockerfile' + type: string latest: description: 'Tag the image with latest?' required: false @@ -55,6 +60,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . + file: ${{ inputs.file }} push: true tags: ${{ steps.create_tags.outputs.tag }} build-args: ${{ inputs.build_args }}