...
1name: golangci
2on:
3 push:
4 branches:
5 - main
6 pull_request:
7jobs:
8 golangci:
9 name: lint
10 runs-on: ubuntu-latest
11 steps:
12 - name: Checkout code
13 uses: actions/checkout@v4
14 - name: Setup Go
15 uses: actions/setup-go@v5
16 with:
17 go-version: "1.21"
18 check-latest: true
19 - name: golangci-lint
20 uses: golangci/golangci-lint-action@v4
21 with:
22 # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
23 version: latest
24
25 # Optional: working directory, useful for monorepos
26 # working-directory: somedir
27
28 # Optional: golangci-lint command line arguments.
29 # args: --issues-exit-code=0
30
31 # Optional: show only new issues if it's a pull request. The default value is `false`.
32 # only-new-issues: true
33
34 # Optional: if set to true then the all caching functionality will be complete disabled,
35 # takes precedence over all other caching options.
36 # skip-cache: true
37
38 # Optional: if set to true then the action don't cache or restore ~/go/pkg.
39 # skip-pkg-cache: true
40
41 # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
42 # skip-build-cache: true
View as plain text