修正打印逻辑,添加对拉取镜像时标签的输出
All checks were successful
Sync Container Images / sync-images (push) Successful in 1m6s
All checks were successful
Sync Container Images / sync-images (push) Successful in 1m6s
This commit is contained in:
parent
531ea9f1c2
commit
46e94a5d84
3
sync.py
3
sync.py
@ -59,11 +59,11 @@ async def main():
|
||||
|
||||
tasks = []
|
||||
for image in config.images:
|
||||
print("Pimage:", image.source)
|
||||
if len(image.tags) > 0:
|
||||
for tag in image.tags:
|
||||
# 定义任务函数
|
||||
async def task():
|
||||
print(f"Pulling image {image.source}:{tag}...")
|
||||
if r := await docker_pull(f"{image.source}:{tag}"):
|
||||
if r != 0:
|
||||
return r
|
||||
@ -81,6 +81,7 @@ async def main():
|
||||
tasks.append(limited_task(task))
|
||||
else:
|
||||
async def task():
|
||||
print(f"Pulling image {image.source}...")
|
||||
if r := await docker_pull(image.source):
|
||||
if r != 0:
|
||||
return r
|
||||
|
Loading…
x
Reference in New Issue
Block a user