@@ -5,31 +5,24 @@ target "_common" {
55 platforms = [" linux/amd64" , " linux/arm64" ]
66}
77
8+ # placeholder for docker-metadata-action target data
9+ target "docker-metadata-action" {
10+ tags = []
11+ }
12+
813target "openmodmail" {
9- name = " openmodmail${ notequal (" " ,INCLUDE_SUPPORTUTILS ) ? " -supportutils " : " " } ${ notequal (" " ,INCLUDE_PIP ) ? " -pip " : " " } "
10- inherits = [" _common" ]
14+ name = " openmodmail${ notequal (" true " ,include - supportutils ) ? " " : " -supportutils " } ${ notequal (" true " ,include - pip ) ? " " : " -pip " } "
15+ inherits = [" _common" , " docker-metadata-action " ]
1116 context = " ."
1217 dockerfile = " Dockerfile"
1318 matrix = {
14- INCLUDE_SUPPORTUTILS = [" true" , " " ]
15- INCLUDE_PIP = [" true" , " " ]
19+ include-supportutils = [" true" , " false " ]
20+ include-pip = [" true" , " false " ]
1621 }
22+ args = {
23+ INCLUDE_SUPPORTUTILS = include- supportutils
24+ INCLUDE_PIP = include- pip
25+ }
26+ # take the tags from the docker-metadata-action target and append the suffixes based on the matrix values
27+ tags = [for tag in target . docker-metadata-action . tags : " ${ tag } ${ notequal (" true" ,include- supportutils) ? " " : " -supportutils" } ${ notequal (" true" ,include- pip) ? " " : " -pip" } " ]
1728}
18-
19- # target "openmodmail-supportutils" {
20- # inherits = ["_common"]
21- # context = "."
22- # dockerfile = "Dockerfile"
23- # args = {
24- # INCLUDE_SUPPORTUTILS = "true"
25- # }
26- # }
27- #
28- # target "openmodmail-pip" {
29- # inherits = ["_common"]
30- # context = "."
31- # dockerfile = "Dockerfile"
32- # args = {
33- # INCLUDE_PIP = "true"
34- # }
35- # }
0 commit comments