Fix auto tag generating tags with wrong suffix (#48)

currently `auto_tag` would generate tags like: `1-latest`, `1.0-latest` etc

Co-authored-by: Lauris BH <lauris@nix.lv>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/48
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
This commit is contained in:
Lauris BH 2022-12-09 10:53:49 +00:00
parent a187589df9
commit 186b87cf88

View File

@ -131,8 +131,8 @@ func (p *Plugin) Validate() error {
) { ) {
tag, err := DefaultTagSuffix( tag, err := DefaultTagSuffix(
p.settings.Build.Ref, p.settings.Build.Ref,
p.settings.Build.TagsSuffix,
p.settings.Build.TagsDefaultName, p.settings.Build.TagsDefaultName,
p.settings.Build.TagsSuffix,
) )
if err != nil { if err != nil {
logrus.Printf("cannot build docker image for %s, invalid semantic version", p.settings.Build.Ref) logrus.Printf("cannot build docker image for %s, invalid semantic version", p.settings.Build.Ref)