diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9eed647..df6fed2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,7 +6,7 @@ on: branches: - master paths: - - 'charts/**' + - "charts/**" jobs: release: @@ -27,5 +27,20 @@ jobs: - name: Run chart-releaser uses: helm/chart-releaser-action@v1.6.0 env: - CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" CR_SKIP_EXISTING: true + - name: Login to GHCR + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - 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