resolveDeployWorkflowSpecs rewrites relative local workflow specs to be anchored to the caller's original working directory before deploy switches into checkoutDir. Remote specs and already-absolute local paths are preserved unchanged.
(workflows []string, baseDir string)
| 269 | // to the caller's original working directory before deploy switches into checkoutDir. |
| 270 | // Remote specs and already-absolute local paths are preserved unchanged. |
| 271 | func resolveDeployWorkflowSpecs(workflows []string, baseDir string) []string { |
| 272 | resolved := make([]string, 0, len(workflows)) |
| 273 | for _, workflow := range workflows { |
| 274 | if !isLocalWorkflowPath(workflow) || filepath.IsAbs(workflow) { |
| 275 | resolved = append(resolved, workflow) |
| 276 | continue |
| 277 | } |
| 278 | |
| 279 | resolved = append(resolved, filepath.Join(baseDir, workflow)) |
| 280 | } |
| 281 | |
| 282 | return resolved |
| 283 | } |
| 284 | |
| 285 | func buildDeployPRMetadata(workflows []string, targetRepo string) (string, string) { |
| 286 | workflowDescription := normalizeWorkflowID(workflows[0]) |