remove cache dir from kubeconform workflow
This commit is contained in:
@@ -12,7 +12,7 @@ jobs:
|
||||
kubeconform:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: gitea.akshun-lab.cc/aggarwalakshun/kube-tools:1.0.0
|
||||
image: gitea.akshun-lab.cc/aggarwalakshun/kube-tools:1.1.0
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
@@ -47,13 +47,11 @@ jobs:
|
||||
)
|
||||
|
||||
EXIT_CODE=0
|
||||
export KUBECONFORM_CACHE_DIR="/tmp/kubeconform-cache"
|
||||
mkdir -p "$KUBECONFORM_CACHE_DIR"
|
||||
|
||||
for file in ${ALL_CHANGED_FILES}; do
|
||||
[ -z "$file" ] && continue
|
||||
echo "=== Validating: $file ==="
|
||||
# Split YAML into individual docs, output as JSON, and process each
|
||||
|
||||
yq e -o=json '. as $item ireduce ([]; . + [$item])' "$file" | \
|
||||
jq -c '.[] | select(.kind != null)' | \
|
||||
while read -r manifest; do
|
||||
@@ -65,7 +63,6 @@ jobs:
|
||||
|
||||
if ! echo "$manifest" | kubeconform \
|
||||
-schema-location "$SCHEMA_URL" \
|
||||
-cache "$KUBECONFORM_CACHE_DIR" \
|
||||
-output json \
|
||||
-; then
|
||||
EXIT_CODE=1
|
||||
@@ -74,7 +71,6 @@ jobs:
|
||||
echo "Validating with default schemas"
|
||||
if ! echo "$manifest" | kubeconform \
|
||||
-schema-location default \
|
||||
-cache "$KUBECONFORM_CACHE_DIR" \
|
||||
-output json \
|
||||
-; then
|
||||
EXIT_CODE=1
|
||||
|
||||
Reference in New Issue
Block a user