diff --git a/cinc/cinc-auditor/docker-bake.hcl b/cinc/cinc-auditor/docker-bake.hcl index b2e31dc..76b9cc5 100644 --- a/cinc/cinc-auditor/docker-bake.hcl +++ b/cinc/cinc-auditor/docker-bake.hcl @@ -3,7 +3,7 @@ variable "IMAGE_NAME" { } variable "VERSION" { - default = "5.21.29" + default = "6.6.0" } variable "CONTAINER_REGISTRY" { @@ -15,6 +15,19 @@ variable "LOCAL_PLATFORM" { default = regex_replace("${BAKE_LOCAL_PLATFORM}", "^(darwin)", "linux") } +# Special target: https://github.com/docker/metadata-action#bake-definition +target "docker-metadata-action" { } + +target "_common" { + inherits = ["docker-metadata-action"] + dockerfile = "Containerfile" + tags = [ + # docker.io/boxcutter/cinc-auditor:x.x.x + "${CONTAINER_REGISTRY}/${IMAGE_NAME}:${VERSION}", + "${CONTAINER_REGISTRY}/${IMAGE_NAME}:latest" + ] +} + target "lint" { dockerfile = "../../hadolint/Containerfile" target = "lint" @@ -34,7 +47,16 @@ target "local" { platforms = ["${LOCAL_PLATFORM}"] } -target "default" { +group "default" { + targets = ["lint", "release"] +} + +target "release" { inherits = ["_common"] platforms = ["linux/amd64", "linux/arm64/v8"] + labels = { + "org.opencontainers.image.source" = "https://github.com/polymathrobotics/oci" + "org.opencontainers.image.licenses" = "Apache-2.0" + "org.opencontainers.image.description" = "Cinc Auditing and Testing Framework." + } } \ No newline at end of file