diff --git a/.build/Build.Docker.cs b/.build/Build.Docker.cs index 9103ef2..e8450db 100644 --- a/.build/Build.Docker.cs +++ b/.build/Build.Docker.cs @@ -19,12 +19,14 @@ partial class Build : NukeBuild Target BuildImage => _ => _ .DependsOn(Test) .DependsOn(Format) + .Requires(() => this.GithubToken) .Executes(() => DockerBuildxBuild(x => x .SetPath(".") .SetFile("Dockerfile") .SetTag(this.DockerImageTag) .SetPlatform(string.Join(",", this.DockerImagePlatforms)) + .SetPush(true) .AddCacheFrom("type=gha") .AddCacheTo("type=gha,mode=max") .AddLabel("org.opencontainers.image.source=https://github.com/fetcharr/fetcharr") @@ -44,11 +46,4 @@ partial class Build : NukeBuild Log.Information(output); } }))); - - Target PushImage => _ => _ - .DependsOn(BuildImage) - .Requires(() => this.GithubToken) - .Executes(() => - DockerImagePush(x => x - .SetName(this.DockerImageTag))); } \ No newline at end of file diff --git a/.build/Build.Release.cs b/.build/Build.Release.cs index abb59b7..0adc9b0 100644 --- a/.build/Build.Release.cs +++ b/.build/Build.Release.cs @@ -10,7 +10,6 @@ partial class Build : NukeBuild Target Release => _ => _ .DependsOn(BuildImage) - .Triggers(PushImage) .Requires(() => this.GithubToken) .Executes(async () => {