2023-02-02 13:53:35 +00:00
|
|
|
load("@aspect_rules_py//py:defs.bzl", _py_binary = "py_binary")
|
2023-02-01 22:36:56 +00:00
|
|
|
load("@io_bazel_rules_docker//python3:image.bzl", "py3_image")
|
|
|
|
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
|
|
|
|
2023-02-02 13:53:35 +00:00
|
|
|
def py_binary(name, image_name, **kwargs):
|
|
|
|
_py_binary(
|
2023-02-01 22:36:56 +00:00
|
|
|
name = name,
|
|
|
|
**kwargs
|
|
|
|
)
|
|
|
|
py3_image(
|
|
|
|
name = "{}.image".format(name),
|
|
|
|
**kwargs
|
|
|
|
)
|
|
|
|
container_push(
|
|
|
|
name = "{}.push".format(name),
|
|
|
|
format = "Docker",
|
|
|
|
image = ":{}.image".format(name),
|
|
|
|
registry = "ghcr.io",
|
|
|
|
repository = "resf/{}".format(image_name),
|
|
|
|
tag = "{BUILD_TAG}",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|