Skip to content

Commit 4aa810a

Browse files
authored
Update lint.yml
1 parent 25c939d commit 4aa810a

File tree

1 file changed

+14
-27
lines changed

1 file changed

+14
-27
lines changed

.github/workflows/lint.yml

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,29 @@
11
name: Lint
22

33
on:
4-
push:
5-
tags:
6-
- v*
7-
branches:
8-
- main
94
pull_request:
105

11-
permissions:
12-
contents: read
13-
pull-requests: read
14-
156
jobs:
167
golangci:
17-
name: lint
8+
name: golangci‑lint
189
runs-on: ubuntu-latest
1910
steps:
20-
- uses: actions/setup-go@v5
21-
with:
22-
go-version: '1.19'
2311
- uses: actions/checkout@v4
24-
- name: golangci-lint
12+
13+
- name: Setup Go
14+
uses: actions/setup-go@v5
15+
with:
16+
go-version: '1.23'
17+
18+
# optional: install the very latest golangci-lint binary
19+
- name: Install golangci-lint
20+
run: |
21+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
22+
echo "::add-path::${{ env.GOPATH }}/bin"
23+
24+
- name: Run golangci-lint via Action
2525
uses: golangci/golangci-lint-action@v8
2626
with:
27-
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
2827
version: latest
29-
# Optional: working directory, useful for monorepos
30-
# working-directory: somedir
31-
32-
# Optional: golangci-lint command line arguments.
3328
args: --enable bodyclose --timeout 10m
34-
35-
# Optional: show only new issues if it's a pull request. The default value is `false`.
3629
only-new-issues: 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

0 commit comments

Comments
 (0)