Skip to content

Commit

Permalink
support only build image without pushing (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
WangDe7 authored Nov 13, 2024
1 parent f67bb91 commit 220f0f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/dep/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ func (e *Matrix) Run(workspace, cs, dockerImage, dockerTags string, dockerPush b
cs += fmt.Sprintf(" && docker push %s:latest", dockerImage)
}
}
} else if dockerImage != "" && dockerTags == "" && e.Type == Service {
if withArmBuild {
cs += fmt.Sprintf(" && docker buildx build -t %s:latest --platform=linux/arm64,linux/amd64 .", dockerImage)
} else {
cs += fmt.Sprintf(" && docker build -t %s:latest .", dockerImage)
}
}
cmd := exec.Command("/bin/bash", "-c", cs)
cmd.Stdout = os.Stdout
Expand Down

0 comments on commit 220f0f5

Please sign in to comment.