Skip to content

Commit

Permalink
feat(helm): publish OCI helm charts
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Ortega <[email protected]>
  • Loading branch information
M0NsTeRRR committed Nov 22, 2024
1 parent dcc9e6d commit 845ab40
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:

jobs:
release:
permissions:
contents: write # to push chart release and create a release (helm/chart-releaser-action)
packages: write # needed for ghcr access

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -23,3 +27,22 @@ jobs:
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Login to GitHub Container Registry
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/*; do
if [ -z "${pkg:-}" ]; then
break
fi
lowercase=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
echo "Pushing package - ${pkg} to ghcr.io repository - ${lowercase}"
helm push "${pkg}" "oci://ghcr.io/${lowercase}"
done

0 comments on commit 845ab40

Please sign in to comment.