diff --git a/.github/workflows/release-charts.yaml b/.github/workflows/release-charts.yaml index ceed0fcc..7abafe5c 100644 --- a/.github/workflows/release-charts.yaml +++ b/.github/workflows/release-charts.yaml @@ -9,6 +9,11 @@ on: # every friday at 4 o'clock - cron: '0 16 * * 5' workflow_dispatch: + +permissions: + contents: write + packages: write + jobs: bump-versions: runs-on: ubuntu-latest @@ -71,15 +76,31 @@ jobs: - name: Install Helm uses: azure/setup-helm@v1 with: - version: v3.5.1 + version: v3.16.1 - name: Add dependency chart repos run: | helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Release charts uses: helm/chart-releaser-action@v1.5.0 with: charts_dir: charts env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + - name: Push Chart to GHCR + run: | + for pkg in .cr-release-packages/*; do + if [ -z "${pkg:-}" ]; then + break + fi + helm push "${pkg}" oci://ghcr.io/jonesbusy/helm-charts + done diff --git a/README.md b/README.md index 4cef37b4..f593f673 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ Once Helm is set up properly, add the repo as follows: $ helm repo add codecentric https://codecentric.github.io/helm-charts ``` +Helm chart are also published to GitHub container registry as OCI artifact. + ## Contributing We welcome contributions. diff --git a/charts/keycloak/README.md b/charts/keycloak/README.md index 0e25c61d..881d884d 100644 --- a/charts/keycloak/README.md +++ b/charts/keycloak/README.md @@ -8,6 +8,12 @@ $ helm install keycloak codecentric/keycloak ``` +or via GitHub Container Registry: + +```console +$ helm install keycloak oci://ghcr.io/codecentric/helm-charts/keycloak --version +``` + ## Introduction This chart bootstraps a [Keycloak](http://www.keycloak.org/) StatefulSet on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. diff --git a/charts/keycloakx/README.md b/charts/keycloakx/README.md index 2a8032d9..00b06ca0 100644 --- a/charts/keycloakx/README.md +++ b/charts/keycloakx/README.md @@ -44,6 +44,12 @@ To install the chart with the release name `keycloakx`: $ helm install keycloak codecentric/keycloakx ``` +or via GitHub Container Registry: + +```console +$ helm install keycloak oci://ghcr.io/codecentric/helm-charts/keycloakx --version +``` + ## Uninstalling the Chart To uninstall the `keycloakx` deployment: diff --git a/charts/mailhog/README.md b/charts/mailhog/README.md index bfae743f..1fc53dcc 100644 --- a/charts/mailhog/README.md +++ b/charts/mailhog/README.md @@ -22,6 +22,12 @@ To install the chart with the release name `mailhog`: $ helm install mailhog codecentric/mailhog ``` +or via GitHub Container Registry: + +```console +$ helm install mailhog oci://ghcr.io/codecentric/helm-charts/mailhog --version +``` + The command deploys Mailhog on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.