mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
fix: docker manifest on draft release (#2119)
docker manifests exepcted to be pushed on draft. - add test for such case Signed-off-by: Dinar Valeev <dinar.valeev@absa.africa>
This commit is contained in:
parent
0e689b414a
commit
57a69dbe47
@ -155,9 +155,6 @@ func process(ctx *context.Context, docker config.Docker, artifacts []*artifact.A
|
||||
if ctx.SkipPublish {
|
||||
return pipe.ErrSkipPublishEnabled
|
||||
}
|
||||
if ctx.Config.Release.Draft {
|
||||
return pipe.Skip("release is marked as draft")
|
||||
}
|
||||
if strings.TrimSpace(docker.SkipPush) == "auto" && ctx.Semver.Prerelease != "" {
|
||||
return pipe.Skip("prerelease detected with 'auto' push, skipping docker publish")
|
||||
}
|
||||
|
@ -1002,6 +1002,18 @@ func TestDefaultDockerfile(t *testing.T) {
|
||||
require.Equal(t, "Dockerfile", ctx.Config.Dockers[1].Dockerfile)
|
||||
}
|
||||
|
||||
func TestDraftRelease(t *testing.T) {
|
||||
var ctx = &context.Context{
|
||||
Config: config.Project{
|
||||
Release: config.Release{
|
||||
Draft: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
require.False(t, pipe.IsSkip(Pipe{}.Publish(ctx)))
|
||||
}
|
||||
|
||||
func TestDefaultNoDockers(t *testing.T) {
|
||||
var ctx = &context.Context{
|
||||
Config: config.Project{
|
||||
|
Loading…
x
Reference in New Issue
Block a user