fix infinite loop
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 16s
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 16s
This commit is contained in:
@@ -63,8 +63,8 @@ jobs:
|
|||||||
for file in ${ALL_CHANGED_FILES}; do
|
for file in ${ALL_CHANGED_FILES}; do
|
||||||
[ -z "$file" ] && continue
|
[ -z "$file" ] && continue
|
||||||
echo "=== Validating: $file ==="
|
echo "=== Validating: $file ==="
|
||||||
DOCS=$(yq eval-all '...' "$file" | wc -l)
|
DOC_COUNT=$(yq eval-all '...' "$file" | grep -c '^---')
|
||||||
for i in $(seq 0 $((DOCS - 1))); do
|
for i in $(seq 0 $((DOC_COUNT - 1))); do
|
||||||
KIND=$(yq eval-all ".[$i].kind // \"\"" "$file")
|
KIND=$(yq eval-all ".[$i].kind // \"\"" "$file")
|
||||||
if [[ -n "$KIND" && -n "${SCHEMA_MAP[$KIND]}" ]]; then
|
if [[ -n "$KIND" && -n "${SCHEMA_MAP[$KIND]}" ]]; then
|
||||||
echo "Found $KIND in document $i - using custom schema"
|
echo "Found $KIND in document $i - using custom schema"
|
||||||
|
|||||||
Reference in New Issue
Block a user