From 4a8753d4985f748beacc2fb17d2eac39dbdbe8df Mon Sep 17 00:00:00 2001 From: Patrik Lundin Date: Wed, 5 Feb 2025 16:12:04 +0100 Subject: [PATCH] Make Dockerfile location configurable --- action.yml | 3 +++ entrypoint.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a3f8496..5e7abed 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/entrypoint.sh b/entrypoint.sh index 9c46bf7..713499c 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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"