Skip to content

Commit

Permalink
Merge pull request #17 from shogo82148/use-golangci-prebuilt-image
Browse files Browse the repository at this point in the history
Use golangci prebuilt image
  • Loading branch information
haya14busa committed Dec 4, 2019
2 parents d880a8d + 6a89045 commit 0c0b38a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM golang:1.13
FROM golangci/golangci-lint:v1.21-alpine

RUN curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v0.9.14
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v0.9.14

RUN apk --no-cache add git && \
rm -rf /var/lib/apt/lists/*

COPY entrypoint.sh /entrypoint.sh

Expand Down
5 changes: 3 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash
#!/bin/sh

cd "$GITHUB_WORKSPACE"
cd "$GITHUB_WORKSPACE" || exit 1

export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

# shellcheck disable=SC2086
golangci-lint run --out-format line-number ${INPUT_GOLANGCI_LINT_FLAGS} \
| reviewdog -f=golangci-lint -name="${INPUT_TOOL_NAME}" -reporter="${INPUT_REPORTER:-github-pr-check}" -level="${INPUT_LEVEL}"

0 comments on commit 0c0b38a

Please sign in to comment.