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

Function artifactPrefixExprForDownstreamJob

pkg/workflow/compiler_workflow_call.go:68–73  ·  view source on GitHub ↗

artifactPrefixExprForDownstreamJob returns the GitHub Actions expression for the artifact prefix used in jobs that depend on the activation job (references an activation job output). Returns empty string for non-workflow_call workflows.

(data *WorkflowData)

Source from the content-addressed store, hash-verified

66// prefix used in jobs that depend on the activation job (references an activation job output).
67// Returns empty string for non-workflow_call workflows.
68func artifactPrefixExprForDownstreamJob(data *WorkflowData) string {
69 if !hasWorkflowCallTrigger(data.On) {
70 return ""
71 }
72 return "${{ needs.activation.outputs.artifact_prefix }}"
73}
74
75// artifactPrefixExprForAgentDownstreamJob returns the expression for the artifact prefix in
76// jobs that only directly depend on the agent job (not the activation job).

Calls 1

hasWorkflowCallTriggerFunction · 0.85

Tested by

no test coverage detected