Skip to content

Commit

Permalink
ci: added pipelines to push charts to docker registry (#5)
Browse files Browse the repository at this point in the history
* ci: added build ci

* docs: update docs
  • Loading branch information
mojixcoder authored Sep 4, 2024
1 parent 9c28b1c commit 762a78c
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 8 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

0 comments on commit 762a78c

Please sign in to comment.