Add IsDynamicActionsWorkflow

This commit is contained in:
Michael B. Gale
2026-01-25 12:06:30 +00:00
parent cabcb83b2f
commit e250c711aa

View File

@@ -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"
}