From e3cb2772306cc838a546a84e55809c6b37b59939 Mon Sep 17 00:00:00 2001 From: Oliver Domokos Date: Mon, 21 Oct 2024 14:24:17 +0200 Subject: [PATCH] add permission to write package Signed-off-by: Oliver Domokos --- .github/workflows/update-helm-repo.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-helm-repo.yaml b/.github/workflows/update-helm-repo.yaml index 2ea76eecf8..b0e8fa287c 100644 --- a/.github/workflows/update-helm-repo.yaml +++ b/.github/workflows/update-helm-repo.yaml @@ -91,8 +91,10 @@ jobs: fi release: - needs: [ setup ] + needs: [setup] runs-on: ubuntu-latest + permissions: + packages: write env: github_app_id: ${{ secrets.github_app_id }} if: needs.setup.outputs.changed == 'true' @@ -225,3 +227,14 @@ 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: | + helm push "${{ env.CR_PACKAGE_PATH }}/${{ steps.parse-chart.outputs.packagename }}.tgz" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/helm-charts"