Skip to content

Commit 5d9e01f

Browse files
committed
chore(ci): build golangci-lint from go.sum to align with project version
Replace golangci-lint-action (which downloads the latest release) with go build from go.sum, so CI uses the same v1.64.7 as local `make lint`. The binary is built with GOOS=linux GOARCH=amd64 for the host runner, while job-level GOOS/GOARCH env vars direct golangci-lint's analysis to the target platform. Signed-off-by: Quang Nguyen <nguyenquang@microsoft.com>
1 parent 732952a commit 5d9e01f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/golangci-lint.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ jobs:
3434
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
3535
with:
3636
go-version-file: go.mod
37+
- name: Build golangci-lint
38+
run: GOOS=linux GOARCH=amd64 go build -o "$RUNNER_TEMP/golangci-lint" github.com/golangci/golangci-lint/cmd/golangci-lint
3739
- 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
40+
run: "$RUNNER_TEMP/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)