From 57b008dca186fc31e4efce36495a2f0c23112dc1 Mon Sep 17 00:00:00 2001 From: Vladimir Varankin Date: Fri, 3 May 2024 15:21:41 +0200 Subject: [PATCH 1/2] workflow: publish chart package to ghcr from update-helm-repo Signed-off-by: Vladimir Varankin --- .github/workflows/update-helm-repo.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/update-helm-repo.yaml b/.github/workflows/update-helm-repo.yaml index 5716b07eb5..0af756d784 100644 --- a/.github/workflows/update-helm-repo.yaml +++ b/.github/workflows/update-helm-repo.yaml @@ -225,3 +225,20 @@ jobs: run: | cd helm-charts "${CR_TOOL_PATH}/cr" index --config "${CR_CONFIGFILE}" --token "${{ env.AUTHTOKEN }}" --index-path "${CR_INDEX_PATH}" --package-path "${CR_PACKAGE_PATH}" --push + + - name: Login to GHCR + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ env.AUTHTOKEN }} + + - name: Push charts 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_OWNER}/helm-charts" + done From 82848ae0805a1fdbf43ec1775007f0344ad4a80d Mon Sep 17 00:00:00 2001 From: Vladimir Varankin Date: Fri, 10 May 2024 12:25:45 +0200 Subject: [PATCH 2/2] update-helm-repo: push only specific chart to registry Signed-off-by: Vladimir Varankin --- .github/workflows/update-helm-repo.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-helm-repo.yaml b/.github/workflows/update-helm-repo.yaml index 0af756d784..57ddba9dea 100644 --- a/.github/workflows/update-helm-repo.yaml +++ b/.github/workflows/update-helm-repo.yaml @@ -233,12 +233,8 @@ jobs: username: ${{ github.actor }} password: ${{ env.AUTHTOKEN }} - - name: Push charts to GHCR + - 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_OWNER}/helm-charts" - done + helm push \ + ${{ env.CR_PACKAGE_PATH }}/${{ steps.parse-chart.outputs.packagename }}.tgz \ + "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/helm-charts"