diff --git a/CHANGELOG.md b/CHANGELOG.md index d629857..ab6d860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# viash-actions v5.2.1 + +## Bug Fixes + +* `project/detect-changed-components`: fix changed components not being detected after updating `tj-actions/changed-files` (PR #25). + # viash-actions v5.2.0 ## Minor changes diff --git a/project/detect-changed-components/action.yml b/project/detect-changed-components/action.yml index c4e9cbe..6220206 100644 --- a/project/detect-changed-components/action.yml +++ b/project/detect-changed-components/action.yml @@ -71,8 +71,15 @@ runs: # create output array declare -a output_array=() + # The output from changed-files is delimited by \; + # So we use delimiter ';' to read the file and trim the backslash from the end. + declare -a changed_files=() + trim_slash() { + line=$2 + changed_files[$1]="${line/%\\/}" + } # read changed files as array - IFS=$';' read -a changed_files <<< "${{ steps.changed-files.outputs.all_changed_files }}" + readarray -d ';' -C trim_slash -c 1 -t <<< "${{ steps.changed-files.outputs.all_changed_files }}" # read components as array readarray -t components < <(jq -c '.[]' "${{ inputs.input_file }}")