Make Dockerfile location configurable

This commit is contained in:
Patrik Lundin 2025-02-05 16:12:04 +01:00
parent 2088faeaa6
commit 4a8753d498
Signed by: patlu
GPG key ID: A0A812BA2249F294
2 changed files with 4 additions and 1 deletions

View file

@ -9,6 +9,9 @@ inputs:
image:
description: 'name of the image: org-name/container-name:latest'
required: true
dockerfile:
description: 'path to Dockerfile'
default: 'Dockerfile'
runs:
using: docker
image: Dockerfile

View file

@ -4,4 +4,4 @@
echo '{"auths":{"'"$(printf "%s" "$INPUT_REGISTRY")"'":{"auth":"'"$(printf "%s" "$INPUT_CREDENTIAL" | base64 | tr -d '\n')"'"}}}' > /kaniko/.docker/config.json
# Build container
/kaniko/executor --dockerfile Dockerfile --destination "$INPUT_REGISTRY/$INPUT_IMAGE"
/kaniko/executor --dockerfile $INPUT_DOCKERFILE --destination "$INPUT_REGISTRY/$INPUT_IMAGE"