Skip to content

Commit

Permalink
feat(github): add Helm OCI support (#2209)
Browse files Browse the repository at this point in the history
Signed-off-by: Engin Diri <engin.diri@ediri.de>
  • Loading branch information
dirien authored Aug 8, 2023
1 parent ebd1ad5 commit 4eae23b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
paths:
- "charts/**"

permissions:
contents: read
Expand All @@ -12,6 +14,7 @@ jobs:
publish:
permissions:
contents: write # for helm/chart-releaser-action to push chart release and create a release
packages: write # to push OCI chart package to GitHub Registry
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -60,3 +63,20 @@ jobs:
config: "./.github/configs/cr.yaml"
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

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

- name: Push chart 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 }}
done

0 comments on commit 4eae23b

Please sign in to comment.