From d5880865e64b55ed61c1bb60a62f59c7f89eb7b6 Mon Sep 17 00:00:00 2001 From: Alexandre Vilain Date: Thu, 28 Dec 2023 10:58:12 +0100 Subject: [PATCH] feat(helm): add release action --- .github/workflows/release-chart.yaml | 48 ++++++++++++++++++++++++++++ Makefile | 2 +- charts/temporal-operator/README.md | 16 ++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-chart.yaml create mode 100644 charts/temporal-operator/README.md diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml new file mode 100644 index 00000000..edab4bc0 --- /dev/null +++ b/.github/workflows/release-chart.yaml @@ -0,0 +1,48 @@ +name: Release Charts + +on: + push: + branches: + - main + - feat/helm-release-action + paths: + - 'charts/**' + +env: + GO_VERSION: "1.21.5" + +jobs: + release: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + check-latest: true + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Generate operator chart + run: make helm + + - name: Install Helm + uses: azure/setup-helm@v3 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.6.0 + env: + CR_SKIP_EXISTING: true + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}" + CR_MAKE_RELEASE_LATEST: false + with: + charts_dir: charts \ No newline at end of file diff --git a/Makefile b/Makefile index d40e5655..9baadd1b 100644 --- a/Makefile +++ b/Makefile @@ -170,7 +170,7 @@ artifacts: kustomize $(KUSTOMIZE) build config/default > ${RELEASE_PATH}/temporal-operator.yaml .PHONY: helm -helm: manifests +helm: manifests artifacts cp ${RELEASE_PATH}/temporal-operator.crds.yaml charts/temporal-operator/crds .PHONY: bundle diff --git a/charts/temporal-operator/README.md b/charts/temporal-operator/README.md new file mode 100644 index 00000000..1ef0220c --- /dev/null +++ b/charts/temporal-operator/README.md @@ -0,0 +1,16 @@ +# Temporal Operator Helm Chart + +This Helm chart deploys the Temporal Operator to manage a Temporal Cluster in a Kubernetes cluster. + +## Prerequisites + +- Kubernetes 1.22+ +- Helm 3+ + +## Installation + +To install the Temporal Operator, use the following Helm command: +```bash +helm repo add +``` +