Skip to content

Commit 8c065f9

Browse files
committed
ci/gha: introduce step to check go.mod version
Introduce the step to validate if the go.mod is in conformance with Kubernetes project standard by using the patch version from the build env (ending with .0, x.y.0).
1 parent 37381a3 commit 8c065f9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/deps.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,20 @@ jobs:
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: "tests/e2e/go.mod must use Go version major.minor.0"
58+
env:
59+
GO_MOD_FILE: go.mod
60+
run: |
61+
test $(grep "^go " $GO_MOD_FILE | awk '{print $2}' | cut -d. -f3) != 0 && exit 1
62+
- name: "tests/e2e/go.mod must use Go version major.minor.0"
63+
env:
64+
GO_MOD_FILE: tests/e2e/go.mod
65+
run: |
66+
test $(grep "^go " $GO_MOD_FILE | awk '{print $2}' | cut -d. -f3) != 0 && exit 1

0 commit comments

Comments
 (0)