Skip to content

Commit bdc662a

Browse files
committed
update crd-schema workflow
This commit updates the crd-schema workflow. Ref: EC-1316 Signed-off-by: Rob Nester <[email protected]>
1 parent f9e6f69 commit bdc662a

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/checks-codecov.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ jobs:
7878

7979
- name: Check for uncommitted changes
8080
run: |
81-
if ! git diff --exit-code -s; then
82-
for f in $(git diff --exit-code --name-only); do
83-
echo "::error file=$f,line=1,col=1,endColumn=1::File was modified in build"
84-
done
81+
git status --porcelain
82+
if ! git diff --exit-code; then
83+
echo "::error::Files were modified during build"
84+
echo -e "\033[1;33mHint:\033[0m Maybe you need to run \033[1;32mmake all\033[0m"
85+
git diff --name-only
8586
exit 1
8687
fi
8788

.github/workflows/crd-schema.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464

6565
- name: Download CRD dependencies
6666
run: |
67+
go mod download
6768
(cd tools/crd && go mod download)
6869
(cd api && go mod download)
6970
(cd schema && go mod download)
@@ -82,11 +83,11 @@ jobs:
8283

8384
- name: Check for uncommitted changes
8485
run: |
85-
if ! git diff --exit-code -s; then
86-
for f in $(git diff --exit-code --name-only); do
87-
echo "::error file=$f,line=1,col=1,endColumn=1::CRD file was modified during build"
88-
echo -e "\033[1;33mHint:\033[0m Maybe you need to run \033[1;32mmake crd-generate\033[0m or \033[1;32mmake crd-docs\033[0m"
89-
done
86+
git status --porcelain
87+
if ! git diff --exit-code; then
88+
echo "::error::CRD files were modified during build"
89+
echo -e "\033[1;33mHint:\033[0m Maybe you need to run \033[1;32mmake crd-generate\033[0m or \033[1;32mmake crd-docs\033[0m"
90+
git diff --name-only
9091
exit 1
9192
fi
9293

0 commit comments

Comments
 (0)