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: add helm generation checker pipeline #1150

Merged
merged 9 commits into from
Apr 11, 2023
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Validate Helm Docs
name: Validate Helm Chart
on:
push:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'
pull_request:
branches:
- 'main'
paths:
- 'helm/**'
- '[0-9]+.[1-9][0-9]*.x'
defaults:
run:
shell: bash
@@ -51,3 +54,38 @@ jobs:
echo ""
echo "Helm values documentation is correct!"
fi
helm-generation-check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Cache build tools
id: cache-build-tools
uses: actions/cache@v3
with:
path: ./bin
key: build-tools-${{ github.ref_name }}

- name: Generate current YAML
run: |
helm template helm/chart > current.yaml
- name: Generate new Helm Chart
run: make helm-package
mowies marked this conversation as resolved.
Show resolved Hide resolved

- name: Generate new YAML
run: |
helm template helm/chart > new.yaml
- name: Compare YAML files
run: |
if ! diff -rq current.yaml new.yaml &>/dev/null; then
echo "Helm charts were not re-generated. Please regenerate them using make helm-package"
exit 1
else
echo ""
echo "There are no changes in the manifests"
fi