From e250c711aa96daeaba0f119de8c6a51de3e69ef4 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Sun, 25 Jan 2026 12:06:30 +0000 Subject: [PATCH] Add `IsDynamicActionsWorkflow` --- go/extractor/util/util.go | 7 +++++++ 1 file changed, 7 insertions(+) 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" +}