From bb4ed617ae59539944efccf1f7f120dc13830a28 Mon Sep 17 00:00:00 2001 From: Allen Conlon Date: Wed, 15 Jan 2025 07:47:27 -0500 Subject: [PATCH] chore: added actions to publish charts to github container registry (#1201) Added actions to publish charts to github container registry Signed-off-by: Allen Conlon --- .github/workflows/publish-charts.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/publish-charts.yaml b/.github/workflows/publish-charts.yaml index 877424579..d0891a76c 100644 --- a/.github/workflows/publish-charts.yaml +++ b/.github/workflows/publish-charts.yaml @@ -74,6 +74,8 @@ jobs: runs-on: ubuntu-latest needs: - test-charts + permissions: + packages: write steps: - name: Checkout uses: actions/checkout@v4 @@ -114,6 +116,25 @@ jobs: helm package charts/$dir -d .cr-release-packages done + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to OCI registry (ghcr.io) + shell: bash + working-directory: redis-operator + run: | + shopt -s nullglob + for pkg in .cr-release-packages/*; do + if [ -z "${pkg:-}" ]; then + break + fi + helm push "${pkg}" "oci://ghcr.io/ot-container-kit/charts" + done + - name: Install chart-releaser uses: helm/chart-releaser-action@v1.6.0 with: