helm-gh-pages
helm-gh-pages copied to clipboard
Root directory chart
Does this action support packaging charts that are at the root of the directory? I'm currently seeing Error: need at least one argument, the path to the chart
whenever I set charts_dir: .
I have a feeling the answer is currently probably a no because of the locate function only looking at type -d
locate() {
for dir in $(find "${CHARTS_DIR}" -type d -mindepth 1 -maxdepth 1); do
if [[ -f "${dir}/Chart.yaml" ]]; then
CHARTS+=("${dir}")
echo "Found chart directory ${dir}"
else
echo "Ignoring non-chart directory ${dir}"
fi
done
}
I went ahead and switched locate to do something like:
locate() {
if [[ "${CHARTS_DIR}" == "." ]]; then
echo "Chart directory set to repository root. Treating everything as part of the chart."
CHARTS+=(".")
else
for dir in $(find "${CHARTS_DIR}" -type d -mindepth 1 -maxdepth 1); do
if [[ -f "${dir}/Chart.yaml" ]]; then
CHARTS+=("${dir}")
echo "Found chart directory ${dir}"
else
echo "Ignoring non-chart directory ${dir}"
fi
done
fi
}
And this now works as expected. Let me know if that is something that you would like to support and I can PR this in.
In the interim, if folks are looking for that functionality, you can go ahead and use tylerauerbeck/helm-gh-pages@main
in your workflows.
FYI specifying charts_dir: ../
could be used as a workaround.