File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -77,19 +77,20 @@ def build_image(
7777 # Build the image once with all repository tags
7878 tags = []
7979 for registry in registries :
80- tag = f"{ registry } :{ build_configuration .version } "
80+ arch_suffix = ""
81+ if build_configuration .architecture_suffix and len (build_configuration .platforms ) == 1 :
82+ arch_suffix = f"-{ build_configuration .platforms [0 ].split ("/" )[1 ]} "
83+
84+ tag = f"{ registry } :{ build_configuration .version } { arch_suffix } "
8185 if build_configuration .skip_if_exists and check_if_image_exists (tag ):
8286 logger .info (f"Image with tag { tag } already exists. Skipping it." )
8387 else :
8488 tags .append (tag )
8589 if build_configuration .latest_tag :
86- tags .append (f"{ registry } :latest" )
90+ tags .append (f"{ registry } :latest{ arch_suffix } " )
8791 if build_configuration .olm_tag :
8892 olm_tag = create_olm_version_tag (build_configuration .version )
89- tags .append (f"{ registry } :{ olm_tag } " )
90- if build_configuration .architecture_suffix and len (build_configuration .platforms ) == 1 :
91- arch = build_configuration .platforms [0 ].split ("/" )[1 ]
92- tags .append (f"{ tag } -{ arch } " )
93+ tags .append (f"{ registry } :{ olm_tag } { arch_suffix } " )
9394
9495 if not tags :
9596 logger .info ("All specified image tags already exist. Skipping build." )
You can’t perform that action at this time.
0 commit comments