From 740c37f3d0d151b8360769895e50f6b23d18d018 Mon Sep 17 00:00:00 2001 From: ProKn1fe Date: Tue, 20 Feb 2024 19:45:28 +0000 Subject: [PATCH] Update main.go --- main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 {