Update check_yaml_name.yml (#341)

This commit is contained in:
raller1028 2023-11-21 17:24:59 +08:00 committed by GitHub
parent 13f5ddaa94
commit 98942c0b4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -19,6 +19,7 @@ jobs:
find . -type f \( -name "docker-compose.yaml" -or -name "docker-compose.yml" \) | while read -r file; do find . -type f \( -name "docker-compose.yaml" -or -name "docker-compose.yml" \) | while read -r file; do
if ! grep -qP '^name:\s[a-z0-9_-]*$' "$file"; then if ! grep -qP '^name:\s[a-z0-9_-]*$' "$file"; then
echo "There is a problem with the value of name in the submitted yaml, please make sure the value is in the range [a-z0-9_-]. And error file name$file" echo "There is a problem with the value of name in the submitted yaml, please make sure the value is in the range [a-z0-9_-]. And error file name$file"
cat $file
exit 1 exit 1
fi fi
done done