diff --git a/.github/workflows/screenshot-comparison-comment.yml b/.github/workflows/screenshot-comparison-comment.yml index 83e1b0926..a36cb62a0 100644 --- a/.github/workflows/screenshot-comparison-comment.yml +++ b/.github/workflows/screenshot-comparison-comment.yml @@ -99,7 +99,7 @@ jobs: shell: bash run: | # Find all the files ending with _compare.png in roborazzi folder - files=$(find . -type f -name "*_compare.png" | grep "roborazzi/" | grep -E "^([-0-9A-Z_a-z.\ \/]|\[|\])+$") + mapfile -d '' -t files < <(find . -type f -name "*_compare.png" -print0) delimiter="$(openssl rand -hex 8)" { echo "reports<<${delimiter}" @@ -111,7 +111,7 @@ jobs: } >> "$GITHUB_OUTPUT" # Iterate over the files and create table rows - for file in $files; do + for file in "${$files[@]}"; do # Get the file name and insert newlines every 20 characters fileName=$(basename "$file" | sed -r 's/(.{20})/\1
/g') urlPart="${BRANCH_NAME//#/%23}/${file//#/%23}"