GetInstallationSteps returns the GitHub Actions steps needed to install OpenCode CLI
(workflowData *WorkflowData)
| 64 | |
| 65 | // GetInstallationSteps returns the GitHub Actions steps needed to install OpenCode CLI |
| 66 | func (e *OpenCodeEngine) GetInstallationSteps(workflowData *WorkflowData) []GitHubActionStep { |
| 67 | openCodeLog.Printf("Generating installation steps for OpenCode engine: workflow=%s", workflowData.Name) |
| 68 | |
| 69 | if workflowData.EngineConfig != nil && workflowData.EngineConfig.Command != "" { |
| 70 | openCodeLog.Printf("Skipping installation steps: custom command specified (%s)", workflowData.EngineConfig.Command) |
| 71 | return []GitHubActionStep{} |
| 72 | } |
| 73 | |
| 74 | npmSteps := BuildStandardNpmEngineInstallSteps( |
| 75 | "opencode-ai", |
| 76 | string(constants.DefaultOpenCodeVersion), |
| 77 | "Install OpenCode CLI", |
| 78 | "opencode", |
| 79 | workflowData, |
| 80 | ) |
| 81 | return BuildNpmEngineInstallStepsWithAWF(npmSteps, workflowData) |
| 82 | } |
| 83 | |
| 84 | // GetSecretValidationStep returns the secret validation step for the OpenCode engine. |
| 85 | // Returns an empty step if permissions.copilot-requests is write (uses GitHub Actions token). |