From 577462b4208fe381492082d1744d65d6cd445e04 Mon Sep 17 00:00:00 2001 From: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com> Date: Thu, 2 Jan 2025 09:32:08 +0100 Subject: [PATCH] add github workflow to package helm chart Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com> --- .github/workflows/.github/workflows/helm.yml | 41 ++++++++++++++++++++ charts/shuffle/Chart.yaml | 2 +- charts/shuffle/README.md | 5 +-- 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/.github/workflows/helm.yml diff --git a/.github/workflows/.github/workflows/helm.yml b/.github/workflows/.github/workflows/helm.yml new file mode 100644 index 00000000..c3a6657a --- /dev/null +++ b/.github/workflows/.github/workflows/helm.yml @@ -0,0 +1,41 @@ + +name: helm + +on: + workflow_dispatch: + push: + branches: + - main + paths: + - "charts/**" + +permissions: + contents: read + packages: write + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install apt dependencies + run: | + curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null + sudo apt-get install apt-transport-https -y --no-install-recommends + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list + sudo apt-get update + sudo apt-get install helm -y --no-install-recommends + + - name: Update helm dependencies + run: helm dependency update ./charts/shuffle + + - name: Package Helm chart + run: helm package ./charts/shuffle --destination ./charts + + - name: Login to OCI registry (ghcr.io) + run: helm registry login ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} + + - name: Push helm chart + run: helm push ./charts/shuffle-*.tgz oci://ghcr.io/shuffle/shuffle/charts diff --git a/charts/shuffle/Chart.yaml b/charts/shuffle/Chart.yaml index 3d74f418..67d1de83 100644 --- a/charts/shuffle/Chart.yaml +++ b/charts/shuffle/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: shuffle description: A Helm chart for deploying Shuffle on Kubernetes type: application -version: 0.0.0 +version: 0.1.0 appVersion: nightly dependencies: - name: common diff --git a/charts/shuffle/README.md b/charts/shuffle/README.md index 3c713a6c..8667ed8d 100644 --- a/charts/shuffle/README.md +++ b/charts/shuffle/README.md @@ -17,8 +17,8 @@ SPDX-License-Identifier: APACHE-2.0 ## Usage ```sh -# Install (the shuffle namespace is hardcoded into the shuffle source code) -helm install shuffle oci://TODO --namespace shuffle --create-namespace +# Install shuffle via helm (the shuffle namespace is hardcoded into the shuffle source code) +helm install shuffle oci://ghcr.io/shuffle/shuffle/charts/shuffle --namespace shuffle --create-namespace ``` ## Secret Parameters @@ -581,4 +581,3 @@ SHUFFLE_ENCRYPTION_MODIFIER: "MyShuffleEncryptionModifier" | `vault.secrets` | A list of VaultSecrets to create | `[]` | ### Other Parameters -