From b9097c7d20b181d1c7f5b0551c874ba74d90df90 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Sat, 13 Dec 2025 16:38:56 -0500 Subject: [PATCH 1/4] publish chart to ghcr Signed-off-by: drfaust92 --- charts/Chart.yaml | 2 +- charts/values.yaml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/charts/Chart.yaml b/charts/Chart.yaml index ff77995f0..8bbf44122 100644 --- a/charts/Chart.yaml +++ b/charts/Chart.yaml @@ -20,4 +20,4 @@ name: answer description: A simple answer deployments for kubernetes type: application version: 0.1.0 -appVersion: "1.0.7" \ No newline at end of file +appVersion: "1.7.0" diff --git a/charts/values.yaml b/charts/values.yaml index d932db848..fdc4e739f 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -23,9 +23,7 @@ replicaCount: 1 image: repository: apache/answer - pullPolicy: Always - # Overrides the image tag whose default is the chart appVersion. - tag: "latest" + pullPolicy: IfNotPresent # Environment variables # Configure environment variables below From de6c3d9b7245e116c33b36e81aacbeebd256c156 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Sat, 13 Dec 2025 16:39:00 -0500 Subject: [PATCH 2/4] publish chart to ghcr Signed-off-by: drfaust92 --- .github/workflows/helm-release.yaml | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/helm-release.yaml diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml new file mode 100644 index 000000000..bb4df3644 --- /dev/null +++ b/.github/workflows/helm-release.yaml @@ -0,0 +1,44 @@ +name: Release Charts + +on: + push: + branches: + - oci # change when done testing + paths: + - 'charts/*' + +permissions: read-all + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write # to push chart release and create a release (helm/chart-releaser-action) + packages: write # needed for ghcr access + id-token: write # needed for keyless signing + steps: + - name: Checkout + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4 + + # see https://github.com/helm/chart-releaser/issues/183 + - name: Login to GitHub Container Registry + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push chart to GHCR + run: | + helm package charts + helm push answer-*.tgz oci://ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/charts # TODO remove when testing done From 465b15cbbb882a723d373964aecde3efc2c687a3 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Sat, 13 Dec 2025 16:44:52 -0500 Subject: [PATCH 3/4] publish chart to ghcr Signed-off-by: drfaust92 --- .github/workflows/helm-release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index bb4df3644..90dd1edfc 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -3,7 +3,7 @@ name: Release Charts on: push: branches: - - oci # change when done testing + - main paths: - 'charts/*' @@ -41,4 +41,4 @@ jobs: - name: Push chart to GHCR run: | helm package charts - helm push answer-*.tgz oci://ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/charts # TODO remove when testing done + helm push answer-*.tgz oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts From 9b4d6cb1b6cdbe80d064ebc4290cd3f7bd07131d Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Sat, 13 Dec 2025 16:47:41 -0500 Subject: [PATCH 4/4] publish chart to ghcr Signed-off-by: drfaust92 --- charts/README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/charts/README.md b/charts/README.md index 26cd6a9cf..956910eff 100644 --- a/charts/README.md +++ b/charts/README.md @@ -63,13 +63,18 @@ $ helm install answer -f values.yaml . ``` > **Tip**: You can use the default [values.yaml] -## TODO +### Installing from the OCI registry -Publish the chart to Artifacthub and add proper installation instructions. E.G. -> **NOTE**: This is not currently a valid installation option. +The chart is published to the GitHub Container Registry and can be installed directly with Helm 3.8+. ```console -$ helm repo add apache https://charts.answer.apache.org/ -$ helm repo update -$ helm install apache/answer -n mynamespace +$ helm install answer oci://ghcr.io/apache/charts/answer --version 0.1.0 +``` + +If you want to inspect or tweak values first, pull the chart and install from the unpacked directory: + +```console +$ helm pull oci://ghcr.io/apache/charts/answer --version 0.1.0 +$ tar -xzf answer-0.1.0.tgz +$ helm install answer ./answer -f values.yaml ``` \ No newline at end of file