diff --git a/.github/workflows/image_metadata.yml b/.github/workflows/image_metadata.yml index 9148abc6df72c..3831a68332419 100644 --- a/.github/workflows/image_metadata.yml +++ b/.github/workflows/image_metadata.yml @@ -38,7 +38,7 @@ jobs: git status # array of accepted copyright strings - accepted_cr=("GNU GPL v2+" "CC BY-SA 4.0" "CC0") + accepted_cr=("GNU GPL v2+|CC BY-SA 4.0|CC0") # cycle through the changed image files, make sure they have the right fields for file in "${image_files[@]}"; do # check -Artist tag, fail if missing @@ -56,7 +56,7 @@ jobs: if [ -z "$copyright" ] ; then echo "no Copyright EXIF tag in $file" exit 1 - elif [[ ! " ${accepted_cr[*]} " =~ " ${copyright} " ]]; then + elif [[ ! "|${accepted_cr[*]}|" =~ "|${copyright}|" ]]; then echo "$copyright is not an accepted license" exit 1 else