@@ -5,9 +5,11 @@ name: Code Style
55
66on :
77 pull_request :
8- branches : [ 'main', 'release-*' ]
8+ branches :
9+ - ' main'
910 push :
10- branches : [ 'main', 'release-*' ]
11+ branches :
12+ - ' main'
1113
1214permissions : {}
1315
1618 gofmt :
1719 name : check gofmt
1820 runs-on : ubuntu-latest
21+
1922 permissions :
2023 contents : read
24+
2125 steps :
2226 - name : Check out code
2327 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -28,15 +32,17 @@ jobs:
2832 go-version-file : ' ./go.mod'
2933 check-latest : true
3034
31- - uses : chainguard-dev/actions/gofmt@main
35+ - uses : chainguard-dev/actions/gofmt@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # v1.1.2
3236 with :
3337 args : -s
3438
3539 goimports :
3640 name : check goimports
3741 runs-on : ubuntu-latest
42+
3843 permissions :
3944 contents : read
45+
4046 steps :
4147 - name : Check out code
4248 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -47,13 +53,15 @@ jobs:
4753 go-version-file : ' ./go.mod'
4854 check-latest : true
4955
50- - uses : chainguard-dev/actions/goimports@main
56+ - uses : chainguard-dev/actions/goimports@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # v1.1.2
5157
5258 golangci-lint :
5359 name : golangci-lint
5460 runs-on : ubuntu-latest
61+
5562 permissions :
5663 contents : read
64+ pull-requests : read
5765
5866 steps :
5967 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -69,12 +77,12 @@ jobs:
6977 uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
7078 with :
7179 # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
72- version : v1.60
73- args : --timeout=5m
80+ version : v2.1
7481
7582 lint :
7683 name : Lint
7784 runs-on : ubuntu-latest
85+
7886 permissions :
7987 contents : read
8088
@@ -88,23 +96,23 @@ jobs:
8896 go-version-file : ' ./go.mod'
8997 check-latest : true
9098
91- - uses : chainguard-dev/actions/trailing-space@main
99+ - uses : chainguard-dev/actions/trailing-space@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # v1.1.2
92100 if : ${{ always() }}
93101
94- - uses : chainguard-dev/actions/eof-newline@main
102+ - uses : chainguard-dev/actions/eof-newline@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # v1.1.2
95103 if : ${{ always() }}
96104
97105 - uses : reviewdog/action-tflint@41b4770c9d9e50741c20e431986b33124a07ca52 # v1.24.2
98106 if : ${{ always() }}
99107 with :
100108 github_token : ${{ secrets.github_token }}
101- fail_on_error : true
109+ fail_level : warning
102110
103111 - uses : reviewdog/action-misspell@9daa94af4357dddb6fd3775de806bc0a8e98d3e4 # v1.26.3
104112 if : ${{ always() }}
105113 with :
106114 github_token : ${{ secrets.github_token }}
107- fail_on_error : true
115+ fail_level : warning
108116 locale : " US"
109117 exclude : |
110118 **/go.sum
0 commit comments