detectFromCustomSteps scans custom steps YAML for runtime commands
(customSteps string, requirements map[string]*RuntimeRequirement)
| 120 | |
| 121 | // detectFromCustomSteps scans custom steps YAML for runtime commands |
| 122 | func detectFromCustomSteps(customSteps string, requirements map[string]*RuntimeRequirement) { |
| 123 | workflowLog.Print("Scanning custom steps for runtime commands") |
| 124 | lines := strings.SplitSeq(customSteps, "\n") |
| 125 | for line := range lines { |
| 126 | // Look for run: commands |
| 127 | if strings.Contains(line, "run:") { |
| 128 | // Extract the command part |
| 129 | parts := strings.SplitN(line, "run:", 2) |
| 130 | if len(parts) == 2 { |
| 131 | cmdLine := strings.TrimSpace(parts[1]) |
| 132 | detectRuntimeFromCommand(cmdLine, requirements) |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | // detectRuntimeFromCommand scans a command string for runtime indicators |
| 139 | func detectRuntimeFromCommand(cmdLine string, requirements map[string]*RuntimeRequirement) { |