diff --git a/.gitea/workflows/render-manifests-dispatch.yaml b/.gitea/workflows/render-manifests-dispatch.yaml index 76caf541c..49e46816c 100644 --- a/.gitea/workflows/render-manifests-dispatch.yaml +++ b/.gitea/workflows/render-manifests-dispatch.yaml @@ -219,12 +219,12 @@ jobs: TEMPLATE=$(helm template "${CHART_NAME}" ./ --namespace "${NAMESPACE}" --include-crds) # Format and split rendered template - echo "${TEMPLATE}" | yq '... comments=""' | yq 'select(. != null)' | yq -s '"'"${OUTPUT_FOLDER}"'/" + .kind + "-" + .metadata.name + ".yaml"' + echo "${TEMPLATE}" | yq '... comments=""' | yq 'select(. != null)' | yq -s '"'"${OUTPUT_FOLDER}"'" + .kind + "-" + .metadata.name + ".yaml"' # Strip comments again to ensure formatting correctness - if ls "${OUTPUT_FOLDER}"/*.yaml 1> /dev/null 2>&1; then - yq -i '... comments=""' "${OUTPUT_FOLDER}"/*.yaml - fi + for file in "$OUTPUT_FOLDER"/*; do + yq -i '... comments=""' $file + done echo "" echo ">> Manifests for ${CHART_NAME} rendered to ${OUTPUT_FOLDER}:"