diff --git a/.github/workflows/helm-chart-ci.yaml b/.github/workflows/helm-chart-ci.yaml index c55fd18..256506e 100644 --- a/.github/workflows/helm-chart-ci.yaml +++ b/.github/workflows/helm-chart-ci.yaml @@ -49,6 +49,25 @@ jobs: fi done + - name: Check objects for images without overrides + run: | + set +e + set -o pipefail + # Look for image: definitions that are not templated. If we find none, exit is not 0 and we invert the error code to get the + # test to pass. Ignore tests for now... + grep "image:" charts/spire/charts/*/templates/*.* | grep -v 'image: {{ template "' > /tmp/findings + res=$? + if [ $res -eq 0 ]; then + { + echo "## Hardcoded images" + echo + echo ":x: These templates were found to be using statically defined images and not overridable ones. Please fix." + echo + cat /tmp/findings + } >> "$GITHUB_STEP_SUMMARY" + exit 1 + fi + lint-chart: runs-on: ubuntu-22.04