Skip to content

Commit

Permalink
Merge pull request #123 from WyriHaximusNet/enforce-values-schema-mus…
Browse files Browse the repository at this point in the history
…t-be-updated-when-values-file-changes

Enforce value files must match schema
  • Loading branch information
WyriHaximus authored Nov 24, 2024
2 parents c82af70 + c6605af commit efa39fb
Showing 1 changed file with 32 additions and 23 deletions.
55 changes: 32 additions & 23 deletions .github/workflows/helm-charts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,42 @@ jobs:
- name: Lint charts
id: lint
run: ct lint --all
# collect-values-files-to-validate:
# runs-on: ubuntu-latest
# name: Validate values schema json
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Validate values schema json
# uses: losisin/helm-values-schema-json-action@v1
# with:
# input: values.yaml
# fail-on-diff: true
# validate-values-schema:
# runs-on: ubuntu-latest
# name: Validate values schema json
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Validate values schema json
# uses: losisin/helm-values-schema-json-action@v1
# with:
# input: values.yaml
# fail-on-diff: true
validate-values-schema:
runs-on: ubuntu-latest
name: Validate values schema json
strategy:
matrix:
chart:
- cron-jobs
- default-backend
- docker-hub-exporter
- pi-hole-exporter
- redirect
- redis-db-assignment-operator
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
charts/${{ matrix.chart }}/
- name: Get values files
uses: tj-actions/glob@v22
id: valueFiles
with:
separator: ","
files: |
charts/${{ matrix.chart }}/**/*values.yaml
- name: Validate values schema json
uses: losisin/helm-values-schema-json-action@v1
with:
input: ${{ steps.valueFiles.outputs.paths }}
output: charts/${{ matrix.chart }}/values.schema.json
fail-on-diff: true
test:
runs-on: ubuntu-latest
needs:
- lint
# - validate-values-schema
- validate-values-schema
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit efa39fb

Please sign in to comment.