From 86afe625317a705b228c8993a3b8dd60837e02f5 Mon Sep 17 00:00:00 2001 From: Jongwoo Han Date: Tue, 20 Aug 2024 11:13:37 +0900 Subject: [PATCH] Publish helm charts to GitHub Container Registry Signed-off-by: Jongwoo Han --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 050e0855..d46e154b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ jobs: # see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token permissions: contents: write + packages: write runs-on: ubuntu-latest steps: - name: Checkout @@ -37,3 +38,19 @@ jobs: uses: helm/chart-releaser-action@v1.6.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push Charts to GHCR + run: | + for pkg in .cr-release-packages/*; do + if [ -z "${pkg:-}" ]; then + break + fi + helm push "${pkg}" oci://ghcr.io/${{ github.repository_owner }}/litmus-helm + done