Skip to content

Commit 762a78c

Browse files
authored
ci: added pipelines to push charts to docker registry (#5)
* ci: added build ci * docs: update docs
1 parent 9c28b1c commit 762a78c

File tree

4 files changed

+46
-8
lines changed

4 files changed

+46
-8
lines changed

.github/workflows/build.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Helm
18+
uses: azure/[email protected]
19+
id: install
20+
with:
21+
version: v3.15.4
22+
23+
- name: Login to Docker registry
24+
run: helm registry login registry.hub.docker.com -u mojixcoder -p ${{ secrets.DOCKER_REGISTRY_TOKEN }}
25+
26+
- name: Set release version
27+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
28+
29+
- name: Building charts
30+
run: helm package . --version="${{ env.RELEASE_VERSION }}" --dependency-update
31+
32+
- name: Push to registry
33+
run: helm push redis-cluster-${{ env.RELEASE_VERSION }}.tgz oci://registry.hub.docker.com/mojixcoder

.github/workflows/test.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515

1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Setup Helm
2121
uses: azure/[email protected]
2222
id: install
2323
with:
24-
version: v3.14.4
24+
version: v3.15.4
2525

2626
- name: Setup kubeconform-helm
2727
run: helm plugin install https://github.com/jtyr/kubeconform-helm

Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: redis-cluster
33
description: A redis-cluster helm chart
44
type: application
5-
version: 0.2.0
6-
appVersion: "0.2.0"
5+
version: 0.4.0
6+
appVersion: "0.4.0"

README.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,15 @@ This repository contains Redis cluster helm charts that can survive pod restarts
4242

4343
Please see the [values.yaml](https://github.com/mojixcoder/redis-cluster/blob/main/values.yaml) to see how the parameters are used.
4444

45-
### Deploy
45+
### Installation
4646

47-
Clone the repo and `cd` to the repo directory.
47+
You should add this package as a dependency in `Charts.yaml` file:
4848

49+
```yaml
50+
dependencies:
51+
- name: redis-cluster
52+
version: 0.4.0
53+
repository: oci://registry.hub.docker.com/mojixcoder
4954
```
50-
helm upgrade -i redis-cluster . -f values.yaml
51-
```
55+
56+
To learn more about adding dependencies to your Helm charts, please follow this [link](https://helm.sh/docs/helm/helm_dependency/).

0 commit comments

Comments
 (0)