From 63032a6f2e4e11ac4db054ee8545f3239c10abc1 Mon Sep 17 00:00:00 2001 From: Valeriano Manassero <14011549+valeriano-manassero@users.noreply.github.com> Date: Thu, 8 Jun 2023 15:00:53 +0200 Subject: [PATCH] Fixed: no chart change detected --- .github/helm-docs.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/helm-docs.sh b/.github/helm-docs.sh index ba4e737..1f593cd 100755 --- a/.github/helm-docs.sh +++ b/.github/helm-docs.sh @@ -1,6 +1,11 @@ -#!/bin/bash +#!/bin/bash -xe CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/main -- 'charts' | grep '[cC]hart.yaml' | sed -e 's#/[Cc]hart.yaml##g')" +if [[ -z "$CHART_DIRS" ]]; then + echo "No Chart.yaml changes detected, aborting helm-docs" + exit 1 +fi + HELM_DOCS_VERSION="1.11.0" curl --silent --show-error --fail --location --output /tmp/helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v"${HELM_DOCS_VERSION}"/helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz