From bc5f178e5ea8b5096f3d831dbcac19b4eb1136d2 Mon Sep 17 00:00:00 2001 From: Shaun Maher Date: Fri, 23 Feb 2024 12:37:22 +1100 Subject: [PATCH] Can't use tags, only semvers. --- .github/workflows/ghcr_deploy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 652e4529f1..5f6cacce48 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -140,7 +140,9 @@ jobs: shell: bash run: | CHART_LIST=$(helm show chart oci://${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/${{ env.CHART_NAME }} 2>/dev/null || true) - if [ ! -z "${CHART_LIST}" ]; then + if [ -z "${CHART_LIST}" ]; then + echo "current-version=0.1.0" | tee -a $GITHUB_OUTPUT + else printf '%s' "${CHART_LIST}" | grep '^version:' | awk 'BEGIN{FS=":"}{print "current-version="$2}' | tr -d " " | tee -a $GITHUB_OUTPUT fi env: @@ -158,7 +160,7 @@ jobs: with: name: ${{ env.CHART_NAME }} repository: ${{ env.REPO_OWNER }} - tag: helm-${{ github.event.inputs.chartVersion || steps.bump_version.outputs.next-version || '0.1.0' }} + tag: ${{ github.event.inputs.chartVersion || steps.bump_version.outputs.next-version || '0.1.0' }} app_version: ${{ steps.current_app_tag.outputs.tag || 'latest' }} path: deploy/charts/${{ env.CHART_NAME }} registry: ${{ env.REGISTRY }}