-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: policy controller chart schema (#904)
* ci: add workflow to validate schema Signed-off-by: falcorocks <[email protected]> * fix: policy controller chart schema removes keys required and additonalProperties from the controller chart schema that were added by mistake in 142e34b see https://sigstore.slack.com/archives/C03096V09F1/p1737627750048369 Signed-off-by: falcorocks <[email protected]> * Update .github/workflows/check-schema-policy-controller.yml Co-authored-by: Bob Callaway <[email protected]> Signed-off-by: falcorocks <[email protected]> * ci: remove go version from setup-go step Signed-off-by: falcorocks <[email protected]> * ci: pin version of setup-go action to v5.3.0 digest (latest) Signed-off-by: falcorocks <[email protected]> --------- Signed-off-by: falcorocks <[email protected]> Co-authored-by: Bob Callaway <[email protected]>
- Loading branch information
1 parent
173e112
commit 7ff2fe4
Showing
4 changed files
with
61 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Check Helm Schema (policy-controller only) | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "charts/policy-controller/**" | ||
|
||
jobs: | ||
schema: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
persist-credentials: false | ||
- name: setup go | ||
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 | ||
|
||
- name: install helm-schema | ||
run: go install github.com/dadav/helm-schema/cmd/helm-schema@latest | ||
|
||
- name: test helm-schema | ||
run: helm-schema --version | ||
|
||
- name: Run Helm Schema and check the outcome | ||
run: | | ||
cd charts/policy-controller && helm-schema -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.