MCPcopy Create free account
hub / github.com/github/gh-aw / resolveContainerImage

Function resolveContainerImage

pkg/workflow/action_pins.go:186–195  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
186func 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

Calls 1

lookupContainerPinFunction · 0.85