From e4d583e62dabf771e50c5de625f437b177ce65c5 Mon Sep 17 00:00:00 2001 From: Aurelien Requiem Date: Sun, 9 Oct 2022 10:36:07 +1100 Subject: [PATCH] update changelog.sh to check the image tag before releasing the chart --- .github/scripts/changelog.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/changelog.sh b/.github/scripts/changelog.sh index dcc3d20..4ba9ec9 100644 --- a/.github/scripts/changelog.sh +++ b/.github/scripts/changelog.sh @@ -36,11 +36,13 @@ PREVIOUS_VERSION="$(git for-each-ref --format="%(refname)" --sort=-creatordate - CHART_VERSION="$(cat "$CHART_DIR/Chart.yaml" | sed '/^version:/!d; s/^version: \(.*\)/\1/g; s/"//g;')" CHART_APPVERSION="$(cat "$CHART_DIR/Chart.yaml" | sed '/^appVersion:/!d; s/^appVersion: \(.*\)/\1/g; s/"//g;')" +VALUES_TAG="$(cat "$CHART_DIR/values.yaml" | sed '/^ tag:/!d; s/^ tag: \(.*\)/\1/g; s/"//g;')" -if [ "$CURRENT_VERSION" != "$CHART_VERSION" -o "$CURRENT_VERSION" != "$CHART_APPVERSION" ]; then +if [ "$CURRENT_VERSION" != "$CHART_VERSION" -o "$CURRENT_VERSION" != "$CHART_APPVERSION" -o "$CURRENT_VERSION" != "$VALUES_TAG" ]; then echo "Version mismatch. The following values should match." echo "$CHART_DIR/Chart.yaml: appVersion: $CHART_APPVERSION" echo "$CHART_DIR/Chart.yaml: version: $CHART_VERSION" + echo "$CHART_DIR/values.yaml: tag: $VALUES_TAG" echo "Command: $CURRENT_VERSION" exit 1 fi