Skip to content

Commit

Permalink
ci: publish helm chart to ghcr (#1340)
Browse files Browse the repository at this point in the history
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
  • Loading branch information
davidspek committed Dec 19, 2023
1 parent 27f13d0 commit 4b60ca8
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/helm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,41 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
packages: write

jobs:
upload-helm-charts:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: azure/setup-helm@v3

- uses: azure/setup-helm@v1
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Package helm charts
run: for dir in ./*/; do helm package $dir; done
working-directory: ${{ env.HELM_CHARTS_PATH }}

- name: Push Charts to GHCR
working-directory: ${{ env.HELM_CHARTS_PATH }}
run: |
for pkg in *.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts
done
- name: Rename helm chart archives
run: for filename in *.tgz; do mv "$filename" "helm-chart-$filename"; done
working-directory: ${{ env.HELM_CHARTS_PATH }}
Expand Down
7 changes: 7 additions & 0 deletions charts/kserve-crd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# kserve-crd

## Using this chart

```console
helm install kserve-crd oci://ghcr.io/kserve/charts/kserve-crd --version 0.11.2
```
15 changes: 15 additions & 0 deletions charts/kserve-resources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# kserve

## Using this chart

First install the `kserve-crd` chart

```console
helm install kserve-crd oci://ghcr.io/kserve/charts/kserve-crd --version 0.11.2
```

Then install this chart

```console
helm install kserve oci://ghcr.io/kserve/charts/kserve --version 0.11.2
```

0 comments on commit 4b60ca8

Please sign in to comment.