-
-
Notifications
You must be signed in to change notification settings - Fork 41
39 lines (37 loc) · 1.13 KB
/
reviewdog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Review Dog
on:
pull_request_target:
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/reviewdog.yml'
jobs:
review-dog:
permissions:
checks: write
contents: read
pull-requests: write
name: Review Dog
runs-on: ubuntu-latest
steps:
- name: Code
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- run: go get
- run: go generate ./...
- name: Set Up GolangCI-Lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Run golangci-lint & reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
golangci-lint run | reviewdog -reporter=github-pr-review -f=golangci-lint -filter-mode=nofilter -fail-on-error