diff --git a/.github/actions/detect-workflow/main.go b/.github/actions/detect-workflow/main.go index 4c5f12c0df..62dfb29259 100644 --- a/.github/actions/detect-workflow/main.go +++ b/.github/actions/detect-workflow/main.go @@ -125,6 +125,13 @@ func (a *action) getRepoRef(ctx context.Context) (string, string, error) { ref = refParts[1] } + if repository == "" { + return "", "", errors.New("no repository detected") + } + if ref == "" { + return "", "", errors.New("no ref detected") + } + return repository, ref, nil }