Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Publish helm chart also as an OCI package to GHCR #75

Merged
merged 2 commits into from
Feb 28, 2024
Merged
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
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- main

permissions:
contents: write # for helm/chart-releaser-action to push chart release and create a release
packages: write # to push OCI chart package to GitHub Registry

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -24,3 +28,20 @@ jobs:
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_GENERATE_RELEASE_NOTES: true

- name: Login to GHCR
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push chart to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/${{ github.repository }}
done
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Usage

Add the repo:
Add the repo (only needed if you want to use the classical approach without using the [OCI registry](https://helm.sh/docs/topics/registries/)):

```
helm repo add kubereboot https://kubereboot.github.io/charts
Expand Down
2 changes: 1 addition & 1 deletion charts/kured/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.15.0"
description: A Helm chart for kured
name: kured
version: 5.4.2
version: 5.4.3
home: https://github.com/kubereboot/kured
maintainers:
- name: chopf
Expand Down
7 changes: 7 additions & 0 deletions charts/kured/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This chart installs the "Kubernetes Reboot Daemon" using the Helm Package Manage

## Prerequisites
- Kubernetes 1.9+
- Helm 3.8.0+ (to pull the chart from the OCI registry)

## Installing the Chart
To install the chart with the release name `my-release`:
Expand All @@ -13,6 +14,12 @@ $ helm repo add kubereboot https://kubereboot.github.io/charts
$ helm install my-release kubereboot/kured
```

You can also pull the helm chart from the OCI registry `ghcr.io`:

```bash
$ helm install my-release oci://ghcr.io/kubereboot/charts/kured
```

## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```bash
Expand Down
Loading