diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml index f172921..aa12edc 100644 --- a/.github/workflows/helm-release.yml +++ b/.github/workflows/helm-release.yml @@ -11,6 +11,7 @@ jobs: release: permissions: contents: write + packages: write runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -23,11 +24,6 @@ jobs: git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - name: Install Helm - uses: azure/setup-helm@v4 - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - - name: Add Dependency Repos run: | helm repo add ollama https://otwld.github.io/ollama-helm/ @@ -41,3 +37,19 @@ jobs: charts_dir: charts/ env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + - name: Login to GitHub Container Registry + run: | + echo "${GHCR_REGISTRY_PASSWORD}" | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin + env: + GHCR_REGISTRY_PASSWORD: "${{ secrets.GITHUB_TOKEN }}" + + - name: Push Charts to ghcr.io + run: | + for pkg in .cr-release-packages/*; do + if [ -z "${pkg:-}" ]; then + echo "No charts to release" + break + fi + helm push "${pkg}" oci://ghcr.io/${{ github.repository }} + done