Skip to content

Commit 7c298b0

Browse files
committed
chore(ci): use go tool for golangci-lint to align with project version
Replace golangci-lint-action (which downloads the latest release) with `go tool`, so CI uses the same v1.64.7 from go.mod as local `make lint`. GOOS/GOARCH are passed inline to avoid affecting the tool build itself. Signed-off-by: Quang Nguyen <nguyenquang@microsoft.com>
1 parent 732952a commit 7c298b0

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

.github/workflows/golangci-lint.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
name: Lint
2525
runs-on: ubuntu-latest
2626
timeout-minutes: 30
27-
env:
28-
GOOS: ${{ matrix.goos }}
29-
GOARCH: ${{ matrix.goarch }}
3027
steps:
3128
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3229
with:
@@ -35,9 +32,4 @@ jobs:
3532
with:
3633
go-version-file: go.mod
3734
- name: golangci-lint
38-
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
39-
with:
40-
version: latest
41-
args: --concurrency 4 --verbose --config=.golangci.yaml --timeout=25m
42-
only-new-issues: true
43-
skip-cache: true
35+
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go tool github.com/golangci/golangci-lint/cmd/golangci-lint run --new-from-rev=${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before || 'HEAD~1' }} --concurrency 4 --verbose --config=.golangci.yaml --timeout=25m

0 commit comments

Comments
 (0)