Skip to content

Commit

Permalink
chore(ci): set up helm chart ci (#185)
Browse files Browse the repository at this point in the history
* chore(ci): set up helm chart ci

Signed-off-by: Ashutosh Kumar <[email protected]>
  • Loading branch information
sonasingh46 authored Dec 5, 2020
1 parent e6b3aec commit 57314c7
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/chart-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Chart Lint and Test

on:
push:
paths:
- 'deploy/helm/**'
branches:
- master
pull_request:
paths:
- 'deploy/helm/**'
branches:
- master

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0

- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml

- name: Create kind cluster
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
run: ct install --config ct.yaml
6 changes: 5 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Go
on: [push, pull_request]
on:
push:
pull_request:
paths-ignore:
- 'deploy/helm/**'
jobs:

test:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/release-charts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release Charts

on:
push:
paths:
- 'deploy/helm/**'
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.CR_TOKEN }}"
with:
charts_dir: deploy/helm
5 changes: 5 additions & 0 deletions ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See https://github.com/helm/chart-testing#configuration
remote: origin
chart-dirs:
- deploy/helm
helm-extra-args: --timeout=500s

0 comments on commit 57314c7

Please sign in to comment.