mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
Fixes (#856)
* fix: avoid triggering %!/(MISSING) for docker output * fix: suppress --platform for empty platform Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
parent
6ae0daebe1
commit
9f5df5e527
2 changed files with 6 additions and 2 deletions
|
@ -29,7 +29,11 @@ type NewDockerBuildExecutorInput struct {
|
|||
func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor {
|
||||
return func(ctx context.Context) error {
|
||||
logger := common.Logger(ctx)
|
||||
logger.Infof("%sdocker build -t %s --platform %s %s", logPrefix, input.ImageTag, input.Platform, input.ContextDir)
|
||||
if input.Platform != "" {
|
||||
logger.Infof("%sdocker build -t %s --platform %s %s", logPrefix, input.ImageTag, input.Platform, input.ContextDir)
|
||||
} else {
|
||||
logger.Infof("%sdocker build -t %s %s", logPrefix, input.ImageTag, input.ContextDir)
|
||||
}
|
||||
if common.Dryrun(ctx) {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue