From e7da084ee8680e093dff3e72a9e1df54d39978d4 Mon Sep 17 00:00:00 2001 From: Russell Cardullo Date: Sat, 12 Dec 2020 08:26:43 -0800 Subject: [PATCH] Match files ending with `Dockerfile` (#32) * Match files ending with `Dockerfile` Some projects name their Dockerfiles like `name.Dockerfile`. This change edits the glob to also match those files when running the action. * Fix shellcheck lint errors Fix errors identified by shellcheck. --- entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3a5c32b..6695a1c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/sh -cd "$GITHUB_WORKSPACE" +cd "$GITHUB_WORKSPACE" || exit export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" EXCLUDES="" @@ -15,12 +15,12 @@ done INPUT_HADOLINT_FLAGS="$INPUT_HADOLINT_FLAGS $IGNORE_LIST" -git ls-files --exclude='Dockerfile*' --ignored ${EXCLUDES} \ - | xargs hadolint ${INPUT_HADOLINT_FLAGS} \ +git ls-files --exclude='*Dockerfile*' --ignored "${EXCLUDES}" \ + | xargs hadolint "${INPUT_HADOLINT_FLAGS}" \ | reviewdog -efm="%f:%l %m" \ -name="${INPUT_TOOL_NAME}" \ -reporter="${INPUT_REPORTER}" \ -filter-mode="${INPUT_FILTER_MODE}" \ -fail-on-error="${INPUT_FAIL_ON_ERROR}" \ -level="${INPUT_LEVEL}" \ - ${INPUT_REVIEWDOG_FLAGS} + "${INPUT_REVIEWDOG_FLAGS}"