Skip to content

Commit

Permalink
Merge pull request #93 from DroidKaigi/takahirom/fix-regex/2024-07-05
Browse files Browse the repository at this point in the history
Fix grep for compare ci
  • Loading branch information
takahirom authored Jul 6, 2024
2 parents b05ab56 + 0fd8d99 commit d61db64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/screenshot-comparison-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
# Check for invalid file names and add only valid ones
exist_valid_files="false"
for file in "${files_to_add[@]}"; do
if [[ $file =~ ^([-a-zA-Z0-9_. ]|\[|\])+$ ]]; then
if [[ $file =~ ^([-0-9A-Z_a-z.\ \/]|\[|\])+$ ]]; then
exist_valid_files="true"
break
fi
Expand All @@ -83,7 +83,7 @@ jobs:
# Check for invalid file names and add only valid ones
for file in $files_to_add; do
if [[ "$file" =~ ^([-a-zA-Z0-9_. ]|\[|\])+$ ]]; then
if [[ "$file" =~ ^([-0-9A-Z_a-z.\ \/]|\[|\])+$ ]]; then
git add "$file"
fi
done
Expand All @@ -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 "^([-a-zA-Z0-9_. ]|\[|\])+$")
files=$(find . -type f -name "*_compare.png" | grep "roborazzi/" | grep -E "^([-0-9A-Z_a-z.\ \/]|\[|\])+$")
delimiter="$(openssl rand -hex 8)"
{
echo "reports<<${delimiter}"
Expand Down

0 comments on commit d61db64

Please sign in to comment.