You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
21
-
go-version: 1.18
22
-
23
-
- name: Generate Go sources, CRDs and schemas
24
-
run: |
25
-
./docker-run.sh ./build.sh
26
-
if [[ ! -z $(git status -s) ]]
27
-
then
28
-
echo 'Command `./docker-run.sh ./build.sh` did introduce changes, which should not be the case if it had been run as part of the PR. Please run it locally and check in the results as part of your PR.'
git diff --exit-code || { echo 'Go mod is not clean. Execute "go mod tidy && go mod vendor" locally and commit changes to fix an issue'; exit 1; }
50
-
51
-
- name: Check GO format
52
-
run: |
53
-
go fmt -x ./...
54
-
git diff --exit-code || { echo 'Go sources need to be formated. Execute "go fmt -x ./..." locally and commit changes to fix an issue'; exit 1; }
55
-
56
-
- name: Check Generator GO mod state
57
-
working-directory: generator
58
-
run: |
59
-
go mod tidy
60
-
go mod vendor
61
-
git diff --exit-code || { echo 'Go mod is not clean. Execute "go mod tidy && go mod vendor" locally in the 'generator' folder and commit changes to fix an issue'; exit 1; }
62
-
63
-
- name: Check Generator GO format
64
-
working-directory: generator
65
-
run: |
66
-
go fmt -x ./...
67
-
git diff --exit-code || { echo 'Go sources need to be formated. Execute "go fmt -x ./..." locally in the 'generator' folder and commit changes to fix an issue'; exit 1; }
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
21
+
go-version: 1.18
22
+
23
+
- name: Generate Go sources, CRDs and schemas
24
+
run: |
25
+
./docker-run.sh ./build.sh
26
+
if [[ ! -z $(git status -s) ]]
27
+
then
28
+
echo 'Command `./docker-run.sh ./build.sh` did introduce changes, which should not be the case if it had been run as part of the PR. Please run it locally and check in the results as part of your PR.'
git diff --exit-code || { echo 'Go mod is not clean. Execute "go mod tidy && go mod vendor" locally and commit changes to fix an issue'; exit 1; }
50
+
51
+
- name: Check GO format
52
+
run: |
53
+
go fmt -x ./...
54
+
git diff --exit-code || { echo 'Go sources need to be formatted. Execute "go fmt -x ./..." locally and commit changes to fix an issue'; exit 1; }
55
+
56
+
- name: Check Generator GO mod state
57
+
working-directory: generator
58
+
run: |
59
+
go mod tidy
60
+
go mod vendor
61
+
git diff --exit-code || { echo 'Go mod is not clean. Execute "go mod tidy && go mod vendor" locally in the 'generator' folder and commit changes to fix an issue'; exit 1; }
62
+
63
+
- name: Check Generator GO format
64
+
working-directory: generator
65
+
run: |
66
+
go fmt -x ./...
67
+
git diff --exit-code || { echo 'Go sources need to be formatted. Execute "go fmt -x ./..." locally in the 'generator' folder and commit changes to fix an issue'; exit 1; }
0 commit comments