bugfix: fix when init registry with other host then push none image (#2830)

Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
This commit is contained in:
zuoxuesong-worker 2025-10-29 10:48:09 +08:00 committed by GitHub
parent 2776e10734
commit 55e8e0046b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,13 +1,4 @@
---
- name: ImageRegistry | Synchronize images to remote host
run_once: true
when:
- printf "%s/images/" .binary_dir | fileExist
copy:
src: >-
{{ .binary_dir }}/images/
dest: >-
{{ .image_registry.images_dir }}
- name: ImageRegistry | Ensure Harbor project exists for each image
when: .image_registry.type | eq "harbor"
@ -38,10 +29,11 @@
done
- name: ImageRegistry | Push images package to image registry
run_once: true
image:
push:
images_dir: >-
{{ .image_registry.images_dir }}
{{ .binary_dir }}/images/
dest: >-
{{ .image_registry.auth.registry }}/{{ .module.image.src.reference.repository }}:{{ .module.image.src.reference.reference }}
username: >-