modify .sh for regex and packaging
-#!/bin/bash
#modify Chart.yaml based on whether workflow was triggered by a new tag or a file update in ./deploy/helm
-if [[ ${GITHUB_REF##*/} == "v"* ]]; then
+if [[ ${GITHUB_REF##*/} =~ "v"[1-9].* ]]; then
sed -i -e "s/^appVersion:.*/appVersion: ${GITHUB_REF##*/}/" ./deploy/helm/kuberhealthy/Chart.yaml
sed -i -e "s/^version:.*/version: $GITHUB_RUN_NUMBER/" ./deploy/helm/kuberhealthy/Chart.yaml
else
@@ -23,11 +22,11 @@ if [ "$?" -ne "0" ]; then
exit 1
fi
-$HELM package --app-version ${GITHUB_REF##*/} --version $GITHUB_RUN_NUMBER -d ../../helm-repos/tmp.d ./kuberhealthy
+$HELM package -d ../../helm-repos/tmp.d ./kuberhealthy
cd ../../helm-repos
$HELM repo index ./tmp.d --merge ./index.yaml --url https://comcast.github.io/kuberhealthy/helm-repos/archives
-mv -f ./tmp.d/kuberhealthy-$GITHUB_RUN_NUMBER.tgz ./archives
+mv -f ./tmp.d/kuberhealthy-*.tgz ./archives
mv -f ./tmp.d/index.yaml ./
