Skip to content

Commit e250c71

Browse files
committed
Add IsDynamicActionsWorkflow
1 parent cabcb83 commit e250c71

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

go/extractor/util/util.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,10 @@ func IsGolangVendorDirectory(dirPath string) bool {
312312
fileExists(filepath.Join(dirPath, "../Gopkg.lock")) ||
313313
fileExists(filepath.Join(dirPath, "../vendor.conf")))
314314
}
315+
316+
// Returns true if the `GITHUB_EVENT_NAME` environment variable is set and suggests that
317+
// we are running in a GitHub Actions workflow that was triggered by the `dynamic` event.
318+
// This is the case for e.g. Default Setup.
319+
func IsDynamicActionsWorkflow() bool {
320+
return os.Getenv("GITHUB_EVENT_NAME") == "dynamic"
321+
}

0 commit comments

Comments
 (0)