From 338d57fd39e447b6d8193da5665ae60604b7d547 Mon Sep 17 00:00:00 2001 From: Jongwoo Han Date: Mon, 26 Aug 2024 17:45:13 +0900 Subject: [PATCH] Publish helm charts to GitHub Container Registry (#398) 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