File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 4747 uses : golang/govulncheck-action@v1
4848 with :
4949 go-version-file : tests/e2e/go.mod
50+ gomod-dotzero-check :
51+ runs-on : ubuntu-latest
52+ steps :
53+ - name : " Checkout Repository"
54+ uses : actions/checkout@v4
55+ with :
56+ show-progress : false
57+ - name : " Go directive must use Go version major.minor.0"
58+ run : |
59+ make verify-go-directive
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ OUTPUT ?= $(shell pwd)/_output
2626INSTALL_PATH ?= $(OUTPUT ) /bin
2727LDFLAGS ?= -w -s -X k8s.io/component-base/version.gitVersion=$(VERSION ) -X main.gitVersion=$(VERSION )
2828
29+ GOLANG_DIRECTIVE_VERSION ?= 1.24.0
30+ CURL_RETRIES ?= 3
31+
2932# flags for ecr-credential-provider artifact promotion
3033UPLOAD ?= $(OUTPUT ) /upload
3134GCS_LOCATION ?= gs://k8s-staging-provider-aws/releases/
@@ -120,7 +123,7 @@ e2e.test:
120123 mv tests/e2e/e2e.test e2e.test
121124
122125.PHONY : check
123- check : verify-fmt verify-lint vet
126+ check : verify-fmt verify-lint vet verify-go-directive
124127
125128.PHONY : develop
126129develop : aws-cloud-controller-manager test update-fmt check
@@ -142,6 +145,12 @@ verify-lint:
142145verify-codegen :
143146 ./hack/verify-codegen.sh
144147
148+ .PHONY : verify-go-directive
149+ verify-go-directive :
150+ # use the core Cluster API script directly to verify the go directive matches the desired one.
151+ # ref: https://github.com/kubernetes-sigs/cluster-api/blob/v1.10.7/hack/verify-go-directive.sh
152+ curl --retry $(CURL_RETRIES ) -fsL https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/refs/tags/v1.11.0/hack/verify-go-directive.sh | bash -s -- -g $(GOLANG_DIRECTIVE_VERSION )
153+
145154.PHONY : vet
146155vet :
147156 go vet ./...
You can’t perform that action at this time.
0 commit comments