From 2681eb923e805be61fcacc23decf7029dc132142 Mon Sep 17 00:00:00 2001 From: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com> Date: Wed, 26 Feb 2025 17:18:30 +0100 Subject: [PATCH 1/3] fix helm release workflow Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com> --- .github/workflows/helm-release.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml index 67af8ea7..1204a634 100644 --- a/.github/workflows/helm-release.yml +++ b/.github/workflows/helm-release.yml @@ -10,7 +10,7 @@ on: branches: - nightly paths: - - "charts/**" + - "functions/kubernetes/charts/**" permissions: contents: read @@ -32,16 +32,16 @@ jobs: sudo apt-get install helm -y --no-install-recommends - name: Set versions - id: set_versions run: | if [[ ${{ github.event_name }} == 'release' ]]; then - CHART_VERSION="${{ github.event.release.tag_name }}" APP_VERSION="${{ github.event.release.tag_name }}" + CHART_VERSION="${{ github.event.release.tag_name }}" else - CHART_VERSION="0.0.0-nightly-untagged-latest" APP_VERSION="nightly" + CHART_VERSION="0.0.0-nightly-untagged-latest" fi + echo "APP_VERSION set to ${APP_VERSION}" echo "CHART_VERSION set to ${CHART_VERSION}. Validating..." # https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string @@ -54,17 +54,17 @@ jobs: exit 1; fi - echo "CHART_VERSION=${CHART_VERSION}" >> $GITHUB_OUTPUT - echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_OUTPUT + echo "CHART_VERSION=${CHART_VERSION}" >> "$GITHUB_ENV" + echo "APP_VERSION=${APP_VERSION}" >> "$GITHUB_ENV" - name: Update helm dependencies - run: helm dependency update ./charts/shuffle + run: helm dependency update ./functions/kubernetes/charts/shuffle - name: Package Helm chart - run: helm package ./charts/shuffle --version "${CHART_VERSION}" --app-version="${APP_VERSION}" --destination ./charts + run: helm package ./functions/kubernetes/charts/shuffle --version "${CHART_VERSION}" --app-version="${APP_VERSION}" --destination ./functions/kubernetes/charts - name: Login to OCI registry (ghcr.io) run: helm registry login ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} - name: Push helm chart - run: helm push ./charts/shuffle-*.tgz oci://ghcr.io/shuffle/shuffle/charts + run: helm push ./functions/kubernetes/charts/shuffle-*.tgz oci://ghcr.io/shuffle/charts From 17f779ffe275a1d00acf1c19563ac2040b7279c1 Mon Sep 17 00:00:00 2001 From: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com> Date: Mon, 24 Mar 2025 14:31:46 +0100 Subject: [PATCH 2/3] remove the v prefix from chart version Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com> --- .github/workflows/helm-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml index 9a70f838..b3851987 100644 --- a/.github/workflows/helm-release.yml +++ b/.github/workflows/helm-release.yml @@ -35,8 +35,9 @@ jobs: - name: Set versions run: | if [[ ${{ github.event_name }} == 'release' ]]; then - APP_VERSION="${{ github.event.release.tag_name }}" - CHART_VERSION="${{ github.event.release.tag_name }}" + VERSION="${{ github.event.release.tag_name }}" + APP_VERSION="${VERSION}" + CHART_VERSION="${VERSION#v}" # Remove the v prefix else APP_VERSION="nightly" CHART_VERSION="0.0.0-nightly-untagged-latest" From d152faec9a356321234cf562d967fcc1d82b9c37 Mon Sep 17 00:00:00 2001 From: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com> Date: Mon, 24 Mar 2025 18:06:03 +0100 Subject: [PATCH 3/3] remove v prefix from app version too Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com> --- .github/workflows/helm-release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml index b3851987..4c3c6b6f 100644 --- a/.github/workflows/helm-release.yml +++ b/.github/workflows/helm-release.yml @@ -35,9 +35,13 @@ jobs: - name: Set versions run: | if [[ ${{ github.event_name }} == 'release' ]]; then - VERSION="${{ github.event.release.tag_name }}" + TAG_NAME="${{ github.event.release.tag_name }}" + + # Remove the v prefix + VERSION=${TAG_NAME#v} + APP_VERSION="${VERSION}" - CHART_VERSION="${VERSION#v}" # Remove the v prefix + CHART_VERSION="${VERSION}" else APP_VERSION="nightly" CHART_VERSION="0.0.0-nightly-untagged-latest"