Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release Charts

on:
push:
branches:
- main
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 "[email protected]"

- 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
2 changes: 1 addition & 1 deletion charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ name: answer
description: A simple answer deployments for kubernetes
type: application
version: 0.1.0
appVersion: "1.0.7"
appVersion: "1.7.0"
17 changes: 11 additions & 6 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 1 addition & 3 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down