@@ -31,15 +31,101 @@ jobs:
3131
3232 curl --output helm-docs.tar.gz --location https://github.com/norwoodj/helm-docs/releases/download/v1.5.0/helm-docs_1.5.0_Linux_x86_64.tar.gz
3333 tar -xvf helm-docs.tar.gz
34- # Verify install
34+ # Verify installation
3535 ./helm-docs --version
3636
3737 - name : Generate Helm Docs
3838 run : |
39- ./helm-docs/helm-docs
39+ # Generate README.md based on Chart.yaml and template
40+ ./helm-docs/helm-docs --template-files=./.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./.helm-docs/README.md.gotmpl
41+
42+ - name : Generate Demo-Apps Docs
43+ run : |
44+ # Start in the hooks folder
45+ cd demo-targets
46+ # https://github.com/koalaman/shellcheck/wiki/SC2044
47+ find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do
48+ (
49+ dir="$(dirname "${chart}")"
50+ echo "Processing Helm Chart in $dir"
51+ cd "${dir}" || exit
52+ if [ -d "docs" ]; then
53+ echo "Docs Folder found at: ${dir}/docs"
54+ ./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.DockerHub-Target.md.gotmpl --output-file=docs/README.DockerHub-Target.md
55+ ./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.ArtifactHub.md.gotmpl --output-file=docs/README.ArtifactHub.md
56+ else
57+ echo "Ignoring Docs creation process for Chart $dir, because no `docs` folder found at: ${dir}/docs"
58+ fi
59+ )
60+ done
61+
62+ - name : Generate Docker Hooks Docs
63+ run : |
64+ # Start in the hooks folder
65+ cd hooks
66+ # https://github.com/koalaman/shellcheck/wiki/SC2044
67+ find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do
68+ (
69+ dir="$(dirname "${chart}")"
70+ echo "Processing Helm Chart in $dir"
71+ cd "${dir}" || exit
72+ if [ -d "docs" ]; then
73+ echo "Docs Folder found at: ${dir}/docs"
74+ ./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.DockerHub-Hook.md.gotmpl --output-file=docs/README.DockerHub-Hook.md
75+ ./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.ArtifactHub.md.gotmpl --output-file=docs/README.ArtifactHub.md
76+ else
77+ echo "Ignoring Docs creation process for Chart $dir, because no `docs` folder found at: ${dir}/docs"
78+ fi
79+ )
80+ done
81+
82+ - name : Generate Docker Scanner Docs
83+ run : |
84+ # Start in the scanners folder
85+ cd scanners
86+ # https://github.com/koalaman/shellcheck/wiki/SC2044
87+ find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do
88+ (
89+ dir="$(dirname "${chart}")"
90+ echo "Processing Helm Chart in $dir"
91+ cd "${dir}" || exit
92+ if [ -d "docs" ]; then
93+ echo "Docs Folder found at: ${dir}/docs"
94+ if [ -d "parser" ]; then
95+ echo "Parser found at: ${dir}/parser"
96+ ./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.DockerHub-Parser.md.gotmpl --output-file=docs/README.DockerHub-Parser.md
97+ fi
98+ if [ -d "scanner" ]; then
99+ echo "Scanner found at: ${dir}/parser"
100+ ./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.DockerHub-Scanner.md.gotmpl --output-file=docs/README.DockerHub-Scanner.md
101+ fi
102+ ./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.ArtifactHub.md.gotmpl --output-file=docs/README.ArtifactHub.md
103+ else
104+ echo "Ignoring Docs creation process for Chart $dir, because no `docs` folder found at: ${dir}/docs"
105+ fi
106+ )
107+ done
108+
109+ - name : Generate Core Docs
110+ run : |
111+ # Start in the operator folder
112+ cd operator
113+ if [ -d "docs" ]; then
114+ echo "Docs Folder found at: operator/docs"
115+ ./../helm-docs/helm-docs --template-files=./../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../.helm-docs/README.DockerHub-Core.md.gotmpl --output-file=docs/README.DockerHub-Core.md
116+ ./../helm-docs/helm-docs --template-files=./../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../.helm-docs/README.ArtifactHub.md.gotmpl --output-file=docs/README.ArtifactHub.md
117+ else
118+ echo "Ignoring Docs creation process for Chart $dir, because no `docs` folder found at: operator/docs"
119+ fi
120+
121+ - name : Remove Helm Docs Files
122+ run : |
40123 # Remove helm-docs download to ensure they don't get commited back
41124 rm -rf helm-docs
42125 - uses : stefanzweifel/git-auto-commit-action@v4.11.0
43126 with :
44127 commit_message : Updating Helm Docs
45128 commit_user_email : securecodebox@iteratec.com
129+ # Optional. Used by `git-commit`.
130+ # See https://git-scm.com/docs/git-commit#_options
131+ commit_options : ' --signoff'
0 commit comments