Skip to content

Commit 845ab40

Browse files
committed
feat(helm): publish OCI helm charts
Signed-off-by: Ludovic Ortega <[email protected]>
1 parent dcc9e6d commit 845ab40

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77

88
jobs:
99
release:
10+
permissions:
11+
contents: write # to push chart release and create a release (helm/chart-releaser-action)
12+
packages: write # needed for ghcr access
13+
1014
runs-on: ubuntu-latest
1115
steps:
1216
- name: Checkout
@@ -23,3 +27,22 @@ jobs:
2327
uses: helm/[email protected]
2428
env:
2529
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
30+
31+
- name: Login to GitHub Container Registry
32+
uses: docker/login-action@v3
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Push charts to GHCR
39+
run: |
40+
shopt -s nullglob
41+
for pkg in .cr-release-packages/*; do
42+
if [ -z "${pkg:-}" ]; then
43+
break
44+
fi
45+
lowercase=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
46+
echo "Pushing package - ${pkg} to ghcr.io repository - ${lowercase}"
47+
helm push "${pkg}" "oci://ghcr.io/${lowercase}"
48+
done

0 commit comments

Comments
 (0)