Skip to content

Commit

Permalink
feature: publish to GHCR registry (#799)
Browse files Browse the repository at this point in the history
* feature: publish to GHCR registry

Signed-off-by: Valentin Delaye <[email protected]>

* Bump helm and fix owner

* Use ${{ github.repository }} to work on forks

---------

Signed-off-by: Valentin Delaye <[email protected]>
  • Loading branch information
jonesbusy authored Nov 22, 2024
1 parent e47cd0e commit 73e22be
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/release-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -71,15 +76,31 @@ jobs:
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.5.1
version: v3.16.3

- 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/[email protected]
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/${{ github.repository }}
done
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions charts/keycloak/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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.
Expand Down
6 changes: 6 additions & 0 deletions charts/keycloakx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <version>
```

## Uninstalling the Chart

To uninstall the `keycloakx` deployment:
Expand Down
6 changes: 6 additions & 0 deletions charts/mailhog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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.

Expand Down

0 comments on commit 73e22be

Please sign in to comment.