Skip to content

Commit

Permalink
ci: add schema test for policy-controller
Browse files Browse the repository at this point in the history
Signed-off-by: falcorocks <[email protected]>
  • Loading branch information
falcorocks committed Jan 23, 2025
1 parent 6b3dd83 commit 0fe317d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/check-schema-policy-controller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check Helm Schema (policy-controller only)

on:
pull_request:
paths:
- "charts/policy-controller/**"

jobs:
readme:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Run Helm Schema and check the outcome
run: |
docker run --rm -v $PWD/charts/policy-controller:/home/helm-schema ghcr.io/dadav/helm-schema:latest -k additionalProperties,required
exit_code=$(git diff --exit-code)
exit ${exit_code}
- name: Print a comment in case of failure
run: |
echo "The policy controller values.schema.json is not up to date or has not been produced correctly
Please, install https://github.com/dadav/helm-schema
And run with flag -k additionalProperties,required before pushing
exit 1
if: |
failure() && github.event.pull_request.head.repo.full_name == github.repository

0 comments on commit 0fe317d

Please sign in to comment.