resolveContainerImage returns the digest-pinned image reference when a cache or embedded container pin exists for image; otherwise it returns the original image.
(image string, data *WorkflowData)
| 184 | // resolveContainerImage returns the digest-pinned image reference when a cache or |
| 185 | // embedded container pin exists for image; otherwise it returns the original image. |
| 186 | func resolveContainerImage(image string, data *WorkflowData) string { |
| 187 | var cache *ActionCache |
| 188 | if data != nil { |
| 189 | cache = data.ActionCache |
| 190 | } |
| 191 | if pin, ok := lookupContainerPin(image, cache); ok && pin.PinnedImage != "" { |
| 192 | return pin.PinnedImage |
| 193 | } |
| 194 | return image |
| 195 | } |
| 196 | |
| 197 | // resolveMCPGatewayContainerImage returns an MCP Gateway-compatible container |
| 198 | // reference. MCP Gateway container fields accept image[:tag] but not digest |