Skip to content

Commit

Permalink
Add on: push GitHub Actions workflow and run reviewdog with -reporter…
Browse files Browse the repository at this point in the history
…=github-check
  • Loading branch information
haya14busa committed Sep 29, 2019
1 parent 2d7e23e commit dde68ca
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yml
@@ -1,4 +1,4 @@
name: reviewdog on GitHub Action
name: reviewdog on Pull Request
on: [pull_request]
jobs:
reviewdog:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/reviewdog_on_push.yml
@@ -0,0 +1,35 @@
name: reviewdog on Push
on: [push]
jobs:
reviewdog:
name: reviewdog
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Add $GOPATH/bin
run: |
echo ::add-path::$(go env GOPATH)/bin
- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Install linters
run: '( cd linters && go get golang.org/x/lint/golint )'

- name: Setup reviewdog
run: |
# mkdir -p $HOME/bin && curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $HOME/bin
# echo ::add-path::$HOME/bin
go install ./cmd/reviewdog
- name: Run reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
reviewdog -reporter=github-check -runners=golint,govet

0 comments on commit dde68ca

Please sign in to comment.