Allow multible Repos (#22)

close partialy #18

we still need to handle multible registry login

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/22
This commit is contained in:
6543
2022-09-28 15:17:39 +02:00
parent 06d32b13a5
commit 10426e6a19
4 changed files with 7 additions and 5 deletions

View File

@@ -122,8 +122,10 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd {
args = append(args, "--platform", strings.Join(build.Platforms.Value()[:], ","))
}
for _, arg := range build.Tags.Value() {
args = append(args, "-t", fmt.Sprintf("%s:%s", build.Repo, arg))
for _, tag := range build.Tags.Value() {
for _, repo := range build.Repo.Value() {
args = append(args, "-t", fmt.Sprintf("%s:%s", repo, tag))
}
}
for _, l := range build.Labels.Value() {

View File

@@ -60,7 +60,7 @@ type Build struct {
Pull bool // Docker build pull
CacheFrom cli.StringSlice // Docker build cache-from
Compress bool // Docker build compress
Repo string // Docker build repository
Repo cli.StringSlice // Docker build repository
NoCache bool // Docker build no-cache
AddHost cli.StringSlice // Docker build add-host
Quiet bool // Docker build quiet