Skip to content

Commit

Permalink
Match files ending with Dockerfile (#32)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
russellcardullo authored Dec 12, 2020
1 parent fd0dd83 commit e7da084
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

cd "$GITHUB_WORKSPACE"
cd "$GITHUB_WORKSPACE" || exit
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

EXCLUDES=""
Expand All @@ -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}"

0 comments on commit e7da084

Please sign in to comment.