Skip to content

Commit 2b74f5d

Browse files
committed
run golangci-lint just once
Signed-off-by: sivchari <[email protected]>
1 parent 23467d8 commit 2b74f5d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.github/workflows/pr-golangci-lint.yaml

+3-6
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,10 @@ jobs:
2424
id: vars
2525
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
2626
- name: Set up Go
27-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # tag=v5.3.0
27+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # tag=v5.4.0
2828
with:
2929
go-version: ${{ steps.vars.outputs.go_version }}
30-
- name: golangci-lint
31-
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # tag=v7.0.0
32-
with:
33-
version: v2.0.2
34-
working-directory: ${{matrix.working-directory}}
30+
- name: Lint Codebase
31+
run: make lint
3532
- name: Lint API
3633
run: make lint-api

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ GINKGO := $(abspath $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER))
160160
GINKGO_PKG := github.com/onsi/ginkgo/v2/ginkgo
161161

162162
GOLANGCI_LINT_BIN := golangci-lint
163-
GOLANGCI_LINT_VER := $(shell cat .github/workflows/pr-golangci-lint.yaml | grep [[:space:]]version: | sed 's/.*version: //')
163+
GOLANGCI_LINT_VER := v2.0.2
164164
GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER))
165165
GOLANGCI_LINT_PKG := github.com/golangci/golangci-lint/v2/cmd/golangci-lint
166166

scripts/go_install.sh

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ if [ -z "${2}" ]; then
2727
exit 1
2828
fi
2929

30+
echo "${3}"
3031
if [ -z "${3}" ]; then
3132
echo "must provide version as third parameter"
3233
exit 1

0 commit comments

Comments
 (0)