diff options
author | Mathijs van Veluw <[email protected]> | 2023-11-07 10:50:58 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-07 10:50:58 +0100 |
commit | efc6eb0073d9740a3bf2dc99e8fe5afd50a2e4e3 (patch) | |
tree | 57b0f5cb38c084281526d9485722efead5fc76b4 | |
parent | cec1e87679cfd0e2f0bce9b7dc3256dbbd2effa8 (diff) | |
download | vaultwarden-efc6eb0073d9740a3bf2dc99e8fe5afd50a2e4e3.tar.gz vaultwarden-efc6eb0073d9740a3bf2dc99e8fe5afd50a2e4e3.zip |
Fix missing alpine tag during buildx bake (#4043)
The bake recipt was missing the single `:alpine` tag for the alpine
builds when we were releasing a `stable/latest` version of Vaultwarden.
This PR fixes this by checking for those conditions and add the
`:alpine` tag too.
We will keep the `:latest-alpine` also, which i find even nicer then just
`:alpine`
Fixes #4035
-rw-r--r-- | docker/docker-bake.hcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docker/docker-bake.hcl b/docker/docker-bake.hcl index 332b46c9..7c28b125 100644 --- a/docker/docker-bake.hcl +++ b/docker/docker-bake.hcl @@ -216,7 +216,13 @@ function "generate_tags" { result = flatten([ for registry in get_container_registries() : [for base_tag in get_base_tags() : - concat(["${registry}:${base_tag}${suffix}${platform}"])] + concat( + # If the base_tag contains latest, and the suffix contains `-alpine` add a `:alpine` tag too + base_tag == "latest" ? suffix == "-alpine" ? ["${registry}:alpine${platform}"] : [] : [], + # The default tagging strategy + ["${registry}:${base_tag}${suffix}${platform}"] + ) + ] ]) } |