From a2af144519b71f0a02084a7200d916ea8bf9bf89 Mon Sep 17 00:00:00 2001 From: Mojtaba Arezoomand Date: Wed, 4 Sep 2024 23:23:57 +0330 Subject: [PATCH 1/2] ci: added build ci --- .github/workflows/build.yaml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/test.yaml | 4 ++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..ab57e5b --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Helm + uses: azure/setup-helm@v4.2.0 + id: install + with: + version: v3.15.4 + + - name: Login to Docker registry + run: helm registry login registry.hub.docker.com -u mojixcoder -p ${{ secrets.DOCKER_REGISTRY_TOKEN }} + + - name: Set release version + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Building charts + run: helm package . --version="${{ env.RELEASE_VERSION }}" --dependency-update + + - name: Push to registry + run: helm push redis-cluster-${{ env.RELEASE_VERSION }}.tgz oci://registry.hub.docker.com/mojixcoder diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7b56694..d6bdf03 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,13 +15,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Helm uses: azure/setup-helm@v4.2.0 id: install with: - version: v3.14.4 + version: v3.15.4 - name: Setup kubeconform-helm run: helm plugin install https://github.com/jtyr/kubeconform-helm From 2e5ea898fe11f6c8b5e51b1c3679d75133b5414e Mon Sep 17 00:00:00 2001 From: Mojtaba Arezoomand Date: Wed, 4 Sep 2024 23:41:51 +0330 Subject: [PATCH 2/2] docs: update docs --- Chart.yaml | 4 ++-- README.md | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index c27ad16..2f91dd3 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: redis-cluster description: A redis-cluster helm chart type: application -version: 0.2.0 -appVersion: "0.2.0" +version: 0.4.0 +appVersion: "0.4.0" diff --git a/README.md b/README.md index 5b3107f..006943e 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,15 @@ This repository contains Redis cluster helm charts that can survive pod restarts Please see the [values.yaml](https://github.com/mojixcoder/redis-cluster/blob/main/values.yaml) to see how the parameters are used. -### Deploy +### Installation -Clone the repo and `cd` to the repo directory. +You should add this package as a dependency in `Charts.yaml` file: +```yaml +dependencies: + - name: redis-cluster + version: 0.4.0 + repository: oci://registry.hub.docker.com/mojixcoder ``` -helm upgrade -i redis-cluster . -f values.yaml -``` + +To learn more about adding dependencies to your Helm charts, please follow this [link](https://helm.sh/docs/helm/helm_dependency/).