diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1a94dbd8d..6dff926f9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,6 +9,7 @@ on: permissions: contents: write + packages: write jobs: release: @@ -24,10 +25,17 @@ jobs: git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Install Helm uses: azure/setup-helm@v4 with: - version: v3.12.0 + version: v3.16.0 - name: Retrieve version from Chart.yaml id: chart_version @@ -84,6 +92,15 @@ jobs: env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + - name: Push Chart to GHCR + run: | + for pkg in .cr-release-packages/*; do + if [ -z "${pkg:-}" ]; then + break + fi + helm push "${pkg}" oci://ghcr.io/jenkinsci/helm-charts + done + - name: Retrieve release info id: release_info if: steps.chart_releaser.outputs.changed_charts != ''