diff --git a/go/extractor/util/util.go b/go/extractor/util/util.go index 5cb97a7bc1d..2c8719d4a18 100644 --- a/go/extractor/util/util.go +++ b/go/extractor/util/util.go @@ -312,3 +312,10 @@ func IsGolangVendorDirectory(dirPath string) bool { fileExists(filepath.Join(dirPath, "../Gopkg.lock")) || fileExists(filepath.Join(dirPath, "../vendor.conf"))) } + +// Returns true if the `GITHUB_EVENT_NAME` environment variable is set and suggests that +// we are running in a GitHub Actions workflow that was triggered by the `dynamic` event. +// This is the case for e.g. Default Setup. +func IsDynamicActionsWorkflow() bool { + return os.Getenv("GITHUB_EVENT_NAME") == "dynamic" +}