I am a bit new to the Bazel world.
My goal is to tag and push images to the registry but with a dynamic tag.
Without Bazel, I used to suffix my version with git commit SHA(6-7 chars), ex. 1.0.0-a68hg4
I want to do the same with the container_push rule.
container_push(
name = "publish",
format = "Docker",
image = ":image",
registry = DOCKER_REGISTRY,
repository = "app1",
skip_unchanged_digest = True,
tag_file = "image.json.sha256",
)
code copied from here.
I can use SHA which makes my tag unique between builds, but can I join strings to make something as I want. I.e. 1.0.0-a68h4
(<a_const_str>-<SHA256_6_char>
Thanks in advance