diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index c30258b..4291a2c 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -6,6 +6,9 @@ on: jobs: helm-release-chart: + permissions: + contents: write + packages: write runs-on: ubuntu-latest steps: - name: Checkout @@ -21,4 +24,21 @@ jobs: - name: Run chart-releaser uses: helm/chart-releaser-action@v1.7.0 env: - CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + - name: Login to GHCR + uses: docker/login-action@v3.2.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - 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}/meilisearch-kubernetes" + done