1 Star 0 Fork 0

NATS / nats-surveyor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docker-bake.hcl 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
Samuel Attwood 提交于 2023-11-21 16:42 . Update CI (#161)
###################
### Variables
###################
variable REGISTRY {
default = ""
}
# Comma delimited list of tags
variable TAGS {
default = "latest"
}
variable CI {
default = false
}
###################
### Functions
###################
function "get_tags" {
params = [image]
result = [for tag in split(",", TAGS) : join("/", compact([REGISTRY, "${image}:${tag}"]))]
}
function "get_platforms_multiarch" {
params = []
result = CI ? ["linux/amd64", "linux/arm/v6", "linux/arm/v7", "linux/arm64"] : []
}
function "get_output" {
params = []
result = CI ? ["type=registry"] : ["type=docker"]
}
###################
### Groups
###################
group "default" {
targets = [
"nats-surveyor"
]
}
###################
### Targets
###################
target "goreleaser" {
contexts = {
src = "."
}
args = {
CI = CI
GITHUB_TOKEN = ""
}
dockerfile = "cicd/Dockerfile_goreleaser"
}
target "nats-surveyor" {
contexts = {
assets = "cicd/assets"
goreleaser = "target:goreleaser"
}
args = {
GO_APP = "nats-surveyor"
}
dockerfile = "cicd/Dockerfile"
platforms = get_platforms_multiarch()
tags = get_tags("nats-surveyor")
output = get_output()
}
1
https://gitee.com/nats-io/nats-surveyor.git
git@gitee.com:nats-io/nats-surveyor.git
nats-io
nats-surveyor
nats-surveyor
main

搜索帮助