Fail release if an empty yaml is generated
@@ -383,6 +383,10 @@ function main() {
abort "error building the release"
fi
[[ -z "${YAMLS_TO_PUBLISH}" ]] && abort "no manifests were generated"
+ # Ensure no empty YAML file will be published.
+ for yaml in ${YAMLS_TO_PUBLISH}; do
+ [[ -s ${yaml} ]] || abort "YAML file ${yaml} is empty"
+ done
echo "New release built successfully"
if (( PUBLISH_RELEASE )); then
tag_images_in_yamls ${YAMLS_TO_PUBLISH}
