Skip to content

Commit

Permalink
fix: docker/entrypoint.sh (#38)
Browse files Browse the repository at this point in the history
Close #37
  • Loading branch information
tsuyoshicho committed Apr 19, 2020
1 parent 8dafe90 commit 6bc053e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
FROM node:current-alpine

ENV REVIEWDOG_VERSION=v0.9.17

RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}
RUN apk --update add git && \
rm -rf /var/lib/apt/lists/* && \
rm /var/cache/apk/*

COPY entrypoint.sh /entrypoint.sh
WORKDIR /
ENV PATH $PATH:/node_modules/.bin
COPY package.json package-lock.json /
RUN npm ci

COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
12 changes: 4 additions & 8 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ cd "$GITHUB_WORKSPACE"

export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

if [ ! -f "$(npm bin)/textlint" ]; then
npm install
fi
textlint --version

$(npm bin)/textlint --version

$(npm bin)/textlint -f checkstyle "${INPUT_TEXTLINT_FLAGS:-'.'}" \
| reviewdog -f=checkstyle -name="textlint" \
-reporter="${INPUT_REPORTER:-'github-pr-check'}" \
textlint -f checkstyle "${INPUT_TEXTLINT_FLAGS:-'.'}" \
| reviewdog -f=checkstyle -name="textlint" \
-reporter="${INPUT_REPORTER:-'github-pr-check'}" \
-level="${INPUT_LEVEL:-'error'}"

0 comments on commit 6bc053e

Please sign in to comment.