Skip to content

Commit

Permalink
add dockerfile input variable (#31)
Browse files Browse the repository at this point in the history
allow the dockerfile to be specified as an input to the build and push action, https://github.com/docker/build-push-action#inputs
  • Loading branch information
camallen authored Jul 20, 2022
1 parent e8cbe81 commit 34dabfb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build_and_push_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 34dabfb

Please sign in to comment.