BuildDefaultSecretValidationStep returns a secret validation step for the given engine configuration, or an empty step when a custom command is specified. This consolidates the common guard+delegate pattern shared across all engine GetSecretValidationStep implementations. Parameters: - workflowData
(workflowData *WorkflowData, secrets []string, name, docsURL string)
| 230 | // Returns: |
| 231 | // - GitHubActionStep: The validation step, or an empty step if a custom command is set |
| 232 | func BuildDefaultSecretValidationStep(workflowData *WorkflowData, secrets []string, name, docsURL string) GitHubActionStep { |
| 233 | if workflowData != nil && workflowData.EngineConfig != nil && workflowData.EngineConfig.Command != "" { |
| 234 | engineHelpersLog.Printf("Skipping secret validation step: custom command specified (%s)", workflowData.EngineConfig.Command) |
| 235 | return GitHubActionStep{} |
| 236 | } |
| 237 | if workflowData != nil && strings.TrimSpace(workflowData.Environment) != "" { |
| 238 | engineHelpersLog.Print("Skipping secret validation step: top-level environment is configured") |
| 239 | return GitHubActionStep{} |
| 240 | } |
| 241 | return GenerateMultiSecretValidationStep(secrets, name, docsURL, getEngineEnvOverrides(workflowData)) |
| 242 | } |
| 243 | |
| 244 | // collectCommonMCPSecrets returns the MCP-related secret names shared across all engines: |
| 245 | // - MCP_GATEWAY_API_KEY (when MCP servers are present) |