Skip to content

Commit

Permalink
migrate to storing helm charts inside the docker registry
Browse files Browse the repository at this point in the history
  • Loading branch information
edevosc2c committed Dec 4, 2024
1 parent 6cd9a67 commit bee4f15
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 8 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/helm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Helm publish on new commit and new version
name: Helm publish new version

on:
push:
branches:
- 'main'
- '!gh-pages'

jobs:
chart-publish:
Expand All @@ -20,13 +19,33 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Helm Installation
uses: azure/setup-helm@v3
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.12.0

- name: Run chart-releaser for publish on new version
if: github.ref == 'refs/heads/main'
uses: helm/chart-releaser-action@main
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
with:
charts_dir: '.'
charts_dir: .
config: cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: "true"

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push charts 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_OWNER}/geonetwork-helm-charts"
done
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,25 @@ Readme: https://github.com/geonetwork/geonetwork-helm-charts/tree/main/metadata-
### gn-tools-pipelines

Readme: https://github.com/geonetwork/geonetwork-helm-charts/tree/main/gn-tools-pipelines

# WARNING: New location storage for the helm chart - How to use

All the helm chart are now stored inside the GitHub Docker registry.

Please use it like so:

## For helmfile.yaml

```
chart: oci://ghcr.io/geonetwork/geonetwork-helm-charts/myhelmchart
version: X.X.X
```

You don't need to include this anymore:
```
repositories:
- name: geonetwork-helm-charts
url: https://helm-charts.geonetwork-opensource.org
```

Make sure to migrate to this new way of working.

0 comments on commit bee4f15

Please sign in to comment.