Avoid pushing a shorter index.yaml file to the index branch (#25913)

* Avoid pushing a shorter index.yaml file to the indes branch

Signed-off-by: Jota Martos <jotamartos@vmware.com>

* Improve messages

Signed-off-by: Jota Martos <jotamartos@vmware.com>

---------

Signed-off-by: Jota Martos <jotamartos@vmware.com>
This commit is contained in:
Juan José Martos
2024-05-15 16:47:36 +02:00
committed by GitHub
parent 19261be87b
commit 0468ca0b74

View File

@@ -140,6 +140,11 @@ jobs:
# Rebuild index
helm repo index --url https://charts.bitnami.com/bitnami --merge bitnami/index.yaml ../download
# Compare size of files
if [[ $(stat -c%s bitnami/index.yaml) -gt $(stat -c%s ../download/index.yaml) ]]; then
echo "New index.yaml file is shorter than the current one"
exit 1
fi
cp ../download/index.yaml bitnami/index.yaml
# Push changes