Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: added pipelines to push charts to docker registry #5

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/).