Skip to content

Commit

Permalink
Update check_image_format.py
Browse files Browse the repository at this point in the history
检查标准镜像格式
  • Loading branch information
imdingtalk authored Jun 21, 2024
1 parent 1833273 commit e8057a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/check_image_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

def is_image_format(text):
# Regular expression pattern to match the specified image formats
pattern = re.compile(r'^\s*([a-zA-Z0-9\*._-]+/[a-zA-Z0-9\*._-]+:[a-zA-Z0-9\*._-]+|[a-zA-Z0-9\*._-]+|[a-zA-Z0-9\*._-]+/[a-zA-Z0-9\*._-]+|[a-zA-Z0-9\*._-]+/[a-zA-Z0-9\*._-]+/[a-zA-Z0-9\*._-]+:[a-zA-Z0-9\*._-]+|[a-zA-Z0-9\*._-]+/[a-zA-Z0-9\*._-]+/[a-zA-Z0-9\*._-]+|[a-zA-Z0-9\*._-]+:[a-zA-Z0-9\*._-]+)\s*$', re.MULTILINE)
pattern = re.compile(r'^\s*([a-zA-Z0-9\*._-]+/[a-zA-Z0-9\*._-]+:[a-zA-Z0-9\*._-]+|[a-zA-Z0-9\*._-]+/[a-zA-Z0-9\*._-]+/[a-zA-Z0-9\*._-]+:[a-zA-Z0-9\*._-]+|[a-zA-Z0-9\*._-]+:[a-zA-Z0-9\*._-]+)\s*$', re.MULTILINE)
lines = text.strip().split('\n')
for line in lines:
if not pattern.match(line):
Expand Down

0 comments on commit e8057a4

Please sign in to comment.