Skip to content

Commit

Permalink
兼容 nvcr.io 的镜像格式如:nvcr.io/nvidia/k8s/dcgm-exporter:3.3.7-3.5.0-ubi9
Browse files Browse the repository at this point in the history
  • Loading branch information
imdingtalk committed Aug 16, 2024
1 parent b21a6f3 commit 88ac195
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\*._-]+)\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\*._-]+/[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 88ac195

Please sign in to comment.