diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a00ad4..8618e9b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,3 +23,22 @@ jobs: uses: helm/chart-releaser-action@v1.4.1 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + 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/*; do + if [ -z "${pkg:-}" ]; then + break + fi + lowercase=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]') + echo "Pushing package - ${pkg} to ghcr.io repository - ${lowercase}" + helm push "${pkg}" "oci://ghcr.io/${lowercase}" + done