Skip to content

Commit

Permalink
Use mapfile
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed Jul 6, 2024
1 parent d96a9e9 commit 484b5c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/screenshot-comparison-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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<br>/g')
urlPart="${BRANCH_NAME//#/%23}/${file//#/%23}"
Expand Down

0 comments on commit 484b5c1

Please sign in to comment.