@@ -5,51 +5,62 @@ name: reviewdog
55on :
66 pull_request :
77
8+ permissions :
9+ contents : read
10+
811# pipeline to execute
912jobs :
1013 diff-review :
1114 runs-on : ubuntu-latest
1215
16+ permissions :
17+ contents : read # for actions/checkout to fetch code
18+ pull-requests : write # for reviewdog/action-golangci-lint to report issues using PR comments
19+
1320 steps :
14- - name : clone
15- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16-
17- - name : install go
18- uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3 .0
19- with :
20- # use version from go.mod file
21- go-version-file : ' go.mod'
22- cache : true
23- check-latest : true
24-
25- - name : golangci-lint
26- uses : reviewdog/action-golangci-lint@dd3fda91790ca90e75049e5c767509dc0ec7d99b # v2.7 .0
27- with :
28- github_token : ${{ secrets.github_token }}
29- golangci_lint_flags : " --config=.golangci.yml"
30- fail_on_error : true
31- filter_mode : diff_context
32- reporter : github-pr-review
21+ - name : clone
22+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
24+ - name : install go
25+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
26+ with :
27+ # use version from go.mod file
28+ go-version-file : " go.mod"
29+ cache : true
30+ check-latest : true
31+
32+ - name : golangci-lint
33+ uses : reviewdog/action-golangci-lint@f9bba13753278f6a73b27a56a3ffb1bfda90ed71 # v2.8 .0
34+ with :
35+ github_token : ${{ secrets.github_token }}
36+ golangci_lint_flags : " --config=.golangci.yml --timeout=5m "
37+ fail_level : error
38+ filter_mode : diff_context
39+ reporter : github-pr-review
3340
3441 full-review :
3542 runs-on : ubuntu-latest
3643
44+ permissions :
45+ checks : write # for reviewdog/action-golangci-lint to report issues using checks
46+ contents : read # for actions/checkout to fetch code
47+
3748 steps :
38- - name : clone
39- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40-
41- - name : install go
42- uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3 .0
43- with :
44- # use version from go.mod file
45- go-version-file : ' go.mod'
46- cache : true
47- check-latest : true
48-
49- - name : golangci-lint
50- uses : reviewdog/action-golangci-lint@dd3fda91790ca90e75049e5c767509dc0ec7d99b # v2.7 .0
51- with :
52- github_token : ${{ secrets.github_token }}
53- golangci_lint_flags : " --config=.golangci.yml"
54- fail_on_error : false
55- filter_mode : nofilter
49+ - name : clone
50+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
51+
52+ - name : install go
53+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
54+ with :
55+ # use version from go.mod file
56+ go-version-file : " go.mod"
57+ cache : true
58+ check-latest : true
59+
60+ - name : golangci-lint
61+ uses : reviewdog/action-golangci-lint@f9bba13753278f6a73b27a56a3ffb1bfda90ed71 # v2.8 .0
62+ with :
63+ github_token : ${{ secrets.github_token }}
64+ golangci_lint_flags : " --config=.golangci.yml --timeout=5m "
65+ fail_level : error
66+ filter_mode : nofilter
0 commit comments