Skip to content

Commit ec55ae9

Browse files
committed
feat(helm): publish OCI helm charts
Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
1 parent 8ae996c commit ec55ae9

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
@@ -28,3 +32,22 @@ jobs:
2832
uses: helm/chart-releaser-action@v1.2.0
2933
env:
3034
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
35+
36+
- name: Login to GitHub Container Registry
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Push charts to GHCR
44+
run: |
45+
shopt -s nullglob
46+
for pkg in .cr-release-packages/*; do
47+
if [ -z "${pkg:-}" ]; then
48+
break
49+
fi
50+
lowercase=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
51+
echo "Pushing package - ${pkg} to ghcr.io repository - ${lowercase}"
52+
helm push "${pkg}" "oci://ghcr.io/${lowercase}"
53+
done

0 commit comments

Comments
 (0)