1
- name : golangci-lint
2
- on :
3
- push :
4
- branches : [ "master", "dev" ]
5
- pull_request :
6
- branches : [ "master", "dev" ]
7
- permissions :
8
- contents : read
9
- # Optional: allow read access to pull request. Use with `only-new-issues` option.
10
- # pull-requests: read
11
- jobs :
12
- golangci :
13
- name : lint
14
- runs-on : ubuntu-latest
15
- steps :
16
- - uses : actions/setup-go@v3
17
- with :
18
- go-version : ' 1.21'
19
- - uses : actions/checkout@v3
20
- - name : golangci-lint
21
- uses : golangci/golangci-lint-action@v3
22
- with :
23
- # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
24
- version : latest
25
-
26
- # Optional: working directory, useful for monorepos
27
- # working-directory: somedir
28
-
29
- # Optional: golangci-lint command line arguments.
30
- # args: --out-format=colored-line-number # can't do that in github actions :(
31
-
32
- # Optional: show only new issues if it's a pull request. The default value is `false`.
33
- # only-new-issues: true
34
-
35
- # Optional: if set to true then the all caching functionality will be complete disabled,
36
- # takes precedence over all other caching options.
37
- # skip-cache: true
38
-
39
- # Optional: if set to true then the action don't cache or restore ~/go/pkg.
40
- # skip-pkg-cache: true
41
-
42
- # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
1
+ name : golangci-lint
2
+ on :
3
+ push :
4
+ branches : [ "master", "dev" ]
5
+ pull_request :
6
+ branches : [ "master", "dev" ]
7
+ permissions :
8
+ contents : read
9
+ # Optional: allow read access to pull request. Use with `only-new-issues` option.
10
+ # pull-requests: read
11
+ jobs :
12
+ golangci :
13
+ name : lint
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/setup-go@v5
17
+ with :
18
+ go-version : ' 1.21'
19
+ - uses : actions/checkout@v4
20
+ - name : golangci-lint
21
+ uses : golangci/golangci-lint-action@v6
22
+ with :
23
+ # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
24
+ version : latest
25
+
26
+ # Optional: working directory, useful for monorepos
27
+ # working-directory: somedir
28
+
29
+ # Optional: golangci-lint command line arguments.
30
+ # args: --out-format=colored-line-number # can't do that in github actions :(
31
+
32
+ # Optional: show only new issues if it's a pull request. The default value is `false`.
33
+ # only-new-issues: true
34
+
35
+ # Optional: if set to true then the all caching functionality will be complete disabled,
36
+ # takes precedence over all other caching options.
37
+ # skip-cache: true
38
+
39
+ # Optional: if set to true then the action don't cache or restore ~/go/pkg.
40
+ # skip-pkg-cache: true
41
+
42
+ # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
43
43
# skip-build-cache: true
0 commit comments