Skip to content

Commit

Permalink
Merge pull request #348 from spotahome/publish
Browse files Browse the repository at this point in the history
Helm chart releaser workflow
  • Loading branch information
ese authored Jan 13, 2022
2 parents 9ca0fb0 + c879dbb commit 887c215
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 4 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: CI

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:

jobs:
check:
name: Check
name: Golang Check
runs-on: ubuntu-latest
# Execute the checks inside the container instead the VM.
container: golangci/golangci-lint:v1.43.0-alpine
Expand Down Expand Up @@ -39,3 +43,19 @@ jobs:
- name: Add redisfailover CRD
run: kubectl apply -f manifests/databases.spotahome.com_redisfailovers.yaml
- run: make ci-integration-test

chart-test:
name: Chart testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2

- name: Helm test
run: make helm-test
31 changes: 31 additions & 0 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release Charts

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2

- name: Release
uses: helm/[email protected]
with:
charts_dir: charts
config: charts/chart-release-config.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ This will create a deployment named `redisoperator`.
From the root folder of the project, execute the following:

```
helm install --name redisfailover charts/redisoperator
helm repo add redis-operator https://spotahome.github.io/redis-operator
helm repo update
helm install redis-operator redis-operator/redis-operator
```

## Usage
Expand Down
1 change: 1 addition & 0 deletions charts/chart-release-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release-name-template: Chart-{{ .Version }}
1 change: 0 additions & 1 deletion charts/redisoperator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ apiVersion: v1
description: A Helm chart for the Spotahome Redis Operator
name: redis-operator
version: 3.1.2
engine: gotpl
home: https://github.com/spotahome/redis-operator
keywords:
- "golang"
Expand Down

0 comments on commit 887c215

Please sign in to comment.