Skip to content

Commit 7ff2fe4

Browse files
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]>
1 parent 173e112 commit 7ff2fe4

File tree

4 files changed

+61
-167
lines changed

4 files changed

+61
-167
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Check Helm Schema (policy-controller only)
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "charts/policy-controller/**"
7+
8+
jobs:
9+
schema:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
with:
16+
persist-credentials: false
17+
- name: setup go
18+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
19+
20+
- name: install helm-schema
21+
run: go install github.com/dadav/helm-schema/cmd/helm-schema@latest
22+
23+
- name: test helm-schema
24+
run: helm-schema --version
25+
26+
- name: Run Helm Schema and check the outcome
27+
run: |
28+
cd charts/policy-controller && helm-schema -k additionalProperties,required
29+
exit_code=$(git diff --exit-code)
30+
exit ${exit_code}
31+
32+
- name: Print a comment in case of failure
33+
run: |
34+
echo "The policy controller values.schema.json is not up to date or has not been produced correctly
35+
36+
Please, install https://github.com/dadav/helm-schema
37+
And run with flag -k additionalProperties,required before pushing
38+
exit 1
39+
if: |
40+
failure() && github.event.pull_request.head.repo.full_name == github.repository

charts/policy-controller/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sources:
88
type: application
99

1010
name: policy-controller
11-
version: 0.9.0
11+
version: 0.9.1
1212
appVersion: 0.12.0
1313

1414
maintainers:

charts/policy-controller/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- This README.md is generated. Please edit README.md.gotmpl -->
44

5-
![Version: 0.9.0](https://img.shields.io/badge/Version-0.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.12.0](https://img.shields.io/badge/AppVersion-0.12.0-informational?style=flat-square)
5+
![Version: 0.9.1](https://img.shields.io/badge/Version-0.9.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.12.0](https://img.shields.io/badge/AppVersion-0.12.0-informational?style=flat-square)
66

77
The Helm chart for Policy Controller
88

0 commit comments

Comments
 (0)