diff --git a/README.md b/README.md index 76ea61b..6dff48a 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ the most used values. So, technically there is a single required argument | path | Path to the build context. Defaults to `.` | false | . | | tag_with_latest | Tags the built image with additional latest tag | false | | | target | Sets the target stage to build | false | | +| debug | Enables trace for entrypoint.sh | false | | **Here is where it gets specific, as the optional arguments become required depending on the registry targeted** diff --git a/action.yml b/action.yml index bc41cfb..cb313e3 100644 --- a/action.yml +++ b/action.yml @@ -54,6 +54,9 @@ inputs: target: description: Sets the target stage to build required: false + debug: + description: Enables trace for entrypoint.sh + required: false runs: using: "docker" image: "Dockerfile" diff --git a/entrypoint.sh b/entrypoint.sh index d2f4421..bbeeff8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,8 @@ #!/busybox/sh set -e pipefail +if [[ "$INPUT_DEBUG" == "true" ]]; then + set -o xtrace +fi export REGISTRY=${INPUT_REGISTRY:-"docker.io"} export IMAGE=${INPUT_IMAGE}