diff --git a/README.md b/README.md index df3b690..3d6d5f0 100644 --- a/README.md +++ b/README.md @@ -72,13 +72,14 @@ jobs: ### Build -| parameter | description | required | default | -| --------- | --------------------------------- | -------- | -------------------- | -| registry | The registry to upload to. | false | gcr.io | -| image | The name of image to build. | false | `$GITHUB_REPOSITORY` | -| tag | The tag of the image. | false | `$GITHUB_SHA` | -| latest | If true, will also add latest tag | true | `true` | -| args | Additional args for docker | false | | +| parameter | description | required | default | +| --------- | --------------------------------- | -------- | -------------------- | +| registry | The registry to upload to. | false | gcr.io | +| image | The name of image to build. | false | `$GITHUB_REPOSITORY` | +| tag | The tag of the image. | false | `$GITHUB_SHA` | +| latest | If true, will also add latest tag | true | `true` | +| args | Additional args for docker | false | | +| dockerfile | The Dockerfile to use | false | Dockerfile | ### Push diff --git a/build/action.yml b/build/action.yml index db6c763..539e718 100644 --- a/build/action.yml +++ b/build/action.yml @@ -25,6 +25,10 @@ inputs: description: the context path required: true default: "." + dockerfile: + description: the Dockerfile to use + required: false + default: "Dockerfile" runs: using: 'docker' diff --git a/build/entrypoint.sh b/build/entrypoint.sh index 857abe4..a021149 100644 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -8,9 +8,10 @@ set -e : ${INPUT_TAG:=$GITHUB_SHA} : ${INPUT_LATEST:=true} : ${INPUT_PATH:=.} +: ${INPUT_DOCKERFILE:=Dockerfile} -docker build $INPUT_ARGS -t $INPUT_IMAGE:$INPUT_TAG $INPUT_PATH +docker build $INPUT_ARGS -f $INPUT_DOCKERFILE -t $INPUT_IMAGE:$INPUT_TAG $INPUT_PATH docker tag $INPUT_IMAGE:$INPUT_TAG $INPUT_REGISTRY/$INPUT_IMAGE:$INPUT_TAG if [ $INPUT_LATEST = true ]; then