mirror of
https://github.com/hadolint/hadolint-action.git
synced 2026-05-15 14:45:53 +00:00
Adds support for multiple dockerfile targets
This commit is contained in:
parent
f49a60108f
commit
a50bc6da73
2 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue