From f2ca8fb8a69ab91943e39eab9a2e55c2a2803768 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Sun, 3 Apr 2022 17:39:26 +0200 Subject: [PATCH] Update action.yaml --- .github/actions/collect-changes/action.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/collect-changes/action.yaml b/.github/actions/collect-changes/action.yaml index d678274cf1f..bef450bed99 100644 --- a/.github/actions/collect-changes/action.yaml +++ b/.github/actions/collect-changes/action.yaml @@ -105,6 +105,11 @@ runs: CHARTS+=("${path_parts[1]}/${path_parts[2]}") done + # Remove duplicates + CHARTS=( `printf "%s\n" "${CHARTS[@]}" | sort -u` ) + # Set output to changed charts + printf "::set-output name=addedOrModified::%s\n" "${CHARTS[*]}" + echo "Number of detected changed charts: ${#CHARTS[@]}" if [ ${#CHARTS[@]} -eq 0 ] || [ "${CHARTS[0]}" = " " ] || [ "${CHARTS[0]}" = "/" ]; then echo "No Changed Charts detected since latest tag..." @@ -118,7 +123,7 @@ runs: # Get only the chart paths # Set output to changed charts - echo "Changed charts with short paths: ${changed_charts[*]}" + echo "Changed charts: ${changed_charts[*]}" printf "::set-output name=modifiedChartsAfterTag::%s\n" "${CHARTS[*]}" fi popd > /dev/null