File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed
Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change 3434
3535 - name : Check for changes
3636 run : |
37- if ! git diff --exit-code; then
37+ # Find all chart directories that contain Chart.yaml
38+ CHART_DIRS=$(find charts -name "Chart.yaml" -exec dirname {} \;)
39+
40+ if [ -z "$CHART_DIRS" ]; then
41+ echo "No Helm charts found in charts/ directory"
42+ exit 0
43+ fi
44+
45+ CHANGES_FOUND=false
46+
47+ for CHART_DIR in $CHART_DIRS; do
48+ echo "Checking documentation in $CHART_DIR..."
49+
50+ # Check if README.md exists and has changes
51+ if [ -f "$CHART_DIR/README.md" ]; then
52+ if ! git diff --exit-code "$CHART_DIR/README.md" > /dev/null 2>&1; then
53+ echo "❌ Documentation is out of date in $CHART_DIR"
54+ CHANGES_FOUND=true
55+ else
56+ echo "✅ Documentation is up to date in $CHART_DIR"
57+ fi
58+ else
59+ echo "⚠️ No README.md found in $CHART_DIR - this might be expected if it's a new chart"
60+ fi
61+ done
62+
63+ if [ "$CHANGES_FOUND" = true ]; then
64+ echo ""
3865 echo "❌ Helm documentation is out of date!"
3966 echo "Please run 'helm-docs' locally and commit the changes."
4067 echo ""
4774 echo " git commit -m 'Update helm docs'"
4875 exit 1
4976 else
50- echo "✅ Helm documentation is up to date!"
77+ echo ""
78+ echo "✅ All Helm documentation is up to date!"
5179 fi
You can’t perform that action at this time.
0 commit comments