From 0fd8d99a7e3b343b54e5fac4ce3bbea3054b719f Mon Sep 17 00:00:00 2001 From: takahirom Date: Sat, 6 Jul 2024 14:37:51 +0900 Subject: [PATCH] Fix grep for compare ci --- .github/workflows/screenshot-comparison-comment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/screenshot-comparison-comment.yml b/.github/workflows/screenshot-comparison-comment.yml index 3e17e7e1b..9a6447fe5 100644 --- a/.github/workflows/screenshot-comparison-comment.yml +++ b/.github/workflows/screenshot-comparison-comment.yml @@ -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 @@ -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 @@ -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}"