2020-12-22 19:12:39 +00:00
|
|
|
name: Helm
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-02-18 10:27:10 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release-*
|
2020-12-22 19:12:39 +00:00
|
|
|
paths:
|
|
|
|
- 'deploy/charts/**'
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'deploy/charts/**'
|
2021-02-18 10:27:10 +00:00
|
|
|
workflow_dispatch: {}
|
2020-12-22 19:12:39 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint-and-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Generate chart
|
|
|
|
run: |
|
2021-02-18 10:27:10 +00:00
|
|
|
make helm.generate
|
2020-12-22 19:12:39 +00:00
|
|
|
|
|
|
|
- name: Set up Helm
|
2021-04-01 08:08:41 +00:00
|
|
|
uses: azure/setup-helm@v1.1
|
2020-12-22 19:12:39 +00:00
|
|
|
with:
|
|
|
|
version: v3.4.2
|
|
|
|
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
|
|
|
uses: helm/chart-testing-action@v2.0.1
|
|
|
|
|
|
|
|
- name: Run chart-testing (list-changed)
|
|
|
|
id: list-changed
|
|
|
|
run: |
|
|
|
|
changed=$(ct list-changed --config=.github/ci/ct.yaml)
|
|
|
|
if [[ -n "$changed" ]]; then
|
|
|
|
echo "::set-output name=changed::true"
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Run chart-testing (lint)
|
|
|
|
run: ct lint --config=.github/ci/ct.yaml
|
|
|
|
|
|
|
|
- name: Create kind cluster
|
|
|
|
uses: helm/kind-action@v1.1.0
|
|
|
|
if: steps.list-changed.outputs.changed == 'true'
|
|
|
|
|
|
|
|
- name: Run chart-testing (install)
|
|
|
|
run: ct install --config=.github/ci/ct.yaml
|