1+ load ("@rules_img//img:image.bzl" , "image_index" , "image_manifest" )
12load ("@rules_img//img:layer.bzl" , "image_layer" )
2- load ("@rules_img//img:image.bzl" , "image_manifest" , "image_index" )
33load ("@rules_img//img:push.bzl" , "image_push" )
44
55def multiarch_go_image (name , binary ):
@@ -16,6 +16,9 @@ def multiarch_go_image(name, binary):
1616 image_layer (
1717 name = tar_target ,
1818 srcs = {"app/{}" .format (native .package_relative_label (binary ).name ): binary },
19+ # Don't build un-transitioned images, as the default target architecture might be unsupported
20+ # For example when building on linux-i386.
21+ tags = ["manual" ],
1922 )
2023
2124 image_manifest (
@@ -37,6 +40,9 @@ def multiarch_go_image(name, binary):
3740 Label ("//tools/platforms:linux_arm64" ),
3841 ],
3942 visibility = ["//visibility:public" ],
43+ # Don't build container image unless explicitly requested, as
44+ # building all variants can be time-consuming.
45+ tags = ["manual" ],
4046 )
4147
4248def container_push_official (name , image , component ):
@@ -46,4 +52,7 @@ def container_push_official(name, image, component):
4652 registry = "ghcr.io" ,
4753 repository = "buildbarn/" + component ,
4854 tag_file = "@com_github_buildbarn_bb_storage//tools:stamped_tags" ,
55+ # Don't build container image unless explicitly requested, as
56+ # building all variants can be time-consuming.
57+ tags = ["manual" ],
4958 )
0 commit comments