(ctx context.Context, resolver SHAResolver, actionRepo, tag, remoteRef, modeLabel string)
| 107 | } |
| 108 | |
| 109 | func tryResolveSetupSHA(ctx context.Context, resolver SHAResolver, actionRepo, tag, remoteRef, modeLabel string) string { |
| 110 | if resolver == nil { |
| 111 | return "" |
| 112 | } |
| 113 | sha, err := resolver.ResolveSHA(ctx, actionRepo, tag) |
| 114 | if err == nil && sha != "" { |
| 115 | pinnedRef := formatActionReference(actionRepo, sha, tag) |
| 116 | actionRefLog.Printf("%s: resolved %s to SHA-pinned reference: %s", modeLabel, remoteRef, pinnedRef) |
| 117 | return pinnedRef |
| 118 | } |
| 119 | if err != nil { |
| 120 | actionRefLog.Printf("Failed to resolve SHA for %s@%s: %v", actionRepo, tag, err) |
| 121 | } |
| 122 | return "" |
| 123 | } |
| 124 | |
| 125 | // resolveActionReference converts a local action path to the appropriate reference |
| 126 | // based on the current action mode (dev vs release vs action). |
no test coverage detected