diff --git a/main.go b/main.go index 183f966..0ba3657 100644 --- a/main.go +++ b/main.go @@ -35,12 +35,11 @@ func main() { } insecure, _ := strconv.ParseBool(gha.GetInput("insecure")) if tagName == "" { + if !strings.HasPrefix(ctx.Ref, "refs/tags/") { + gha.Fatalf("ref %s is not a tag", ctx.Ref) + } tagName = ctx.RefName } -// I don't understend what this doing -// if !strings.HasPrefix(tagName, "refs/tags/") { -// gha.Fatalf("ref %s is not a tag", tagName) -// } client := http.DefaultClient if insecure {