Skip to content

Commit 2fedd14

Browse files
committed
feat: Add a helm-lint job to the build workflow
See hive-operator#743 which already tested this for Hive. helm lint validates the chart templates and, where a values.schema.json exists, the default values against it.
1 parent 371f6f5 commit 2fedd14

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

template/.github/workflows/build.yaml.j2

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,31 @@ jobs:
6262
outputs:
6363
detected: ${{ steps.check.outputs.detected }}
6464

65+
helm-lint:
66+
name: Lint Helm Chart
67+
needs:
68+
- detect-changes
69+
if: needs.detect-changes.outputs.detected == 'true'
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Checkout Repository
73+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
74+
with:
75+
persist-credentials: false
76+
77+
# Validates the chart templates and, where a values.schema.json exists, the
78+
# default values against it.
79+
#
80+
# The chart cannot render without a registry overlay, because image.repository
81+
# is only set there.
82+
- name: Lint Helm Chart
83+
env:
84+
CHART_DIRECTORY: deploy/helm/{[ operator.name }]
85+
run: |
86+
for registry in oci.stackable.tech quay.io; do
87+
helm lint "$CHART_DIRECTORY" --values "$CHART_DIRECTORY/values/${registry}.yaml"
88+
done
89+
6590
cargo-udeps:
6691
name: Run cargo-udeps
6792
if: needs.detect-changes.outputs.detected == 'true'
@@ -384,6 +409,7 @@ jobs:
384409
needs:
385410
- detect-changes
386411
- cargo-udeps
412+
- helm-lint
387413
- build-container-image
388414
- publish-index-manifest
389415
- provenance-oci

0 commit comments

Comments
 (0)