diff --git a/action.yml b/action.yml index e5163ab..82ab3f2 100644 --- a/action.yml +++ b/action.yml @@ -4,7 +4,7 @@ author: 'Bruno Paz' inputs: dockerfile: required: false - description: 'The path to the Dockerfile to lint' + description: 'Path to Dockerfile(s). Provide a single path or multiple paths space-separated (e.g., "Dockerfile path/to/another/Dockerfile").' default: 'Dockerfile' format: required: false diff --git a/hadolint.sh b/hadolint.sh index e74c807..0486197 100755 --- a/hadolint.sh +++ b/hadolint.sh @@ -12,8 +12,8 @@ chmod -R a+rX "${TMP_FOLDER}" # the repository so we don't leave the checkout dirty. We also remove # the matcher so it won't take effect in later steps. cleanup() { - echo "::remove-matcher owner=brpaz/hadolint-action::" - rm -rf "${TMP_FOLDER}" + echo "::remove-matcher owner=brpaz/hadolint-action::" + rm -rf "${TMP_FOLDER}" } trap cleanup EXIT @@ -27,5 +27,7 @@ for i in $HADOLINT_IGNORE; do HADOLINT_IGNORE_CMDLINE="${HADOLINT_IGNORE_CMDLINE} --ignore=${i}" done +DOCKERFILE_LIST=$(printf '%s ' "$@") + # shellcheck disable=SC2086 -hadolint $HADOLINT_IGNORE_CMDLINE $HADOLINT_CONFIG "$@" +hadolint $HADOLINT_IGNORE_CMDLINE $HADOLINT_CONFIG $DOCKERFILE_LIST