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

Function resolveSetupReleaseModeRef

pkg/workflow/action_reference.go:81–95  ·  view source on GitHub ↗
(ctx context.Context, actionTag string, version string, resolver SHAResolver, localPath string)

Source from the content-addressed store, hash-verified

79}
80
81func resolveSetupReleaseModeRef(ctx context.Context, actionTag string, version string, resolver SHAResolver, localPath string) string {
82 tag, ok := resolveSetupTag(actionTag, version, localPath)
83 if !ok {
84 return localPath
85 }
86 actionPath := strings.TrimPrefix(localPath, "./")
87 actionRepo := fmt.Sprintf("%s/%s", GitHubOrgRepo, actionPath)
88 remoteRef := fmt.Sprintf("%s@%s", actionRepo, tag)
89 ref := tryResolveSetupSHA(ctx, resolver, actionRepo, tag, remoteRef, "Release mode")
90 if ref != "" {
91 return ref
92 }
93 actionRefLog.Printf("Release mode: using tag-based remote action reference: %s (SHA will be resolved later)", remoteRef)
94 return remoteRef
95}
96
97func resolveSetupTag(actionTag string, version string, localPath string) (string, bool) {
98 tag := actionTag

Callers 1

resolveSetupActionRefFunction · 0.85

Calls 3

resolveSetupTagFunction · 0.85
tryResolveSetupSHAFunction · 0.85
PrintfMethod · 0.45

Tested by

no test coverage detected