From 0468ca0b74ebb83feeb8fbb1c8bb0f21e02f2e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Martos?= Date: Wed, 15 May 2024 16:47:36 +0200 Subject: [PATCH] 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 * Improve messages Signed-off-by: Jota Martos --------- Signed-off-by: Jota Martos --- .github/workflows/cd-pipeline.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cd-pipeline.yml b/.github/workflows/cd-pipeline.yml index 0b2fe2af670014..650886fa8ac440 100644 --- a/.github/workflows/cd-pipeline.yml +++ b/.github/workflows/cd-pipeline.yml @@ -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