diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6194f72..97cf5bf 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 @@ -24,3 +28,20 @@ jobs: env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" CR_GENERATE_RELEASE_NOTES: true + + - name: Login to GHCR + uses: docker/login-action@v3.0.0 + 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 diff --git a/README.md b/README.md index 65f6f73..d00b664 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/charts/kured/Chart.yaml b/charts/kured/Chart.yaml index f8ccecc..df7a059 100644 --- a/charts/kured/Chart.yaml +++ b/charts/kured/Chart.yaml @@ -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 diff --git a/charts/kured/README.md b/charts/kured/README.md index cd2f21e..d078cde 100644 --- a/charts/kured/README.md +++ b/charts/kured/README.md @@ -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`: @@ -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