Skip to content

Commit

Permalink
use git builtin instead of find (#1)
Browse files Browse the repository at this point in the history
Dockerfile updates
update path of reviewdog binary
install reviewdog binary in the same way as they are doing for their own actions

Signed-off-by: Felix Bartels <felix@host-consultants.de>
  • Loading branch information
fbartels authored and mgrachev committed Dec 13, 2019
1 parent 670384b commit 32af563
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
FROM alpine:3.10

RUN apk add --update --no-cache git
RUN wget -q https://github.com/hadolint/hadolint/releases/download/v1.17.3/hadolint-Linux-x86_64 -O /bin/hadolint \
&& chmod +x /bin/hadolint
ENV \
HADOLINT_VERSION=1.17.3 \
REVIEWDOG_VERSION=0.9.14

# hadolint ignore=DL3018
RUN apk add --no-cache git
RUN wget -q https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-Linux-x86_64 -O /usr/local/bin/hadolint \
&& chmod +x /usr/local/bin/hadolint

RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b /usr/local/bin/ v$REVIEWDOG_VERSION

COPY entrypoint.sh /entrypoint.sh
COPY bin/reviewdog /bin/reviewdog

ENTRYPOINT ["/entrypoint.sh"]
Binary file removed bin/reviewdog
Binary file not shown.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cd "$GITHUB_WORKSPACE"

export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

find . -name "Dockerfile*" | xargs hadolint \
| /bin/reviewdog -efm="%f:%l %m" -name="${INPUT_TOOL_NAME}" -reporter="${INPUT_REPORTER}" -level="${INPUT_LEVEL}"
git ls-files --exclude='Dockerfile*' --ignored | xargs hadolint \
| reviewdog -efm="%f:%l %m" -name="${INPUT_TOOL_NAME}" -reporter="${INPUT_REPORTER}" -level="${INPUT_LEVEL}"

0 comments on commit 32af563

Please sign in to comment.