mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
Add IsDynamicActionsWorkflow
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user