Update action.yaml

This commit is contained in:
Kjeld Schouten-Lebbing
2022-04-03 16:41:39 +02:00
committed by GitHub
parent 3bb7e3057b
commit ab34b21df9

View File

@@ -97,22 +97,26 @@ runs:
echo "Discovering changed charts since '$latest_tag'..."
changed_charts=()
readarray -t changed_charts <<< "$(lookup_changed_charts "$latest_tag")"
echo "Number of detected changed charts: ${#changed_charts[@]}"
if [ ${#changed_charts[@]} -eq 0 ] || [ ((${#changed_charts[@]})) ] || [ "${changed_charts[0]}" = "\" ]; then
CHARTS=()
for CHARTPATH in "${changed_charts[@]}"
do
IFS='/' read -r -a path_parts <<< "${CHARTPATH}"
CHARTS+=("${path_parts[1]}/${path_parts[2]}")
done
echo "Number of detected changed charts: ${#CHARTS[@]}"
if [ ${#CHARTS[@]} -eq 0 ] || [ "${CHARTS[0]}" = " " ] || [ "${CHARTS[0]}" = "/" ]; then
echo "No Changed Charts detected since latest tag..."
printf "::set-output name=changesDetectedAfterTag::%s\n" "false"
else
echo "Changed Charts detected since latest tag, parsing..."
printf "::set-output name=changesDetectedAfterTag::%s\n" "true"
CHARTS=()
echo "Changed charts: ${changed_charts[*]}"
# Get only the chart paths
for CHARTPATH in "${changed_charts[@]}"
do
IFS='/' read -r -a path_parts <<< "${CHARTPATH}"
CHARTS+=("${path_parts[1]}/${path_parts[2]}")
done
# Set output to changed charts
echo "Changed charts with short paths: ${changed_charts[*]}"
printf "::set-output name=modifiedChartsAfterTag::%s\n" "${CHARTS[*]}"