buildAgentOutputDownloadSteps creates steps to download the agent output artifact and set the GH_AW_AGENT_OUTPUT environment variable for safe-output jobs. GH_AW_AGENT_OUTPUT is only set when the artifact was actually downloaded successfully. prefix is prepended to the artifact name; use empty strin
(prefix string, pinAction func(string) string)
| 261 | // prefix is prepended to the artifact name; use empty string for non-workflow_call workflows. |
| 262 | // pinAction resolves the download-artifact action reference; pass c.getActionPin from Compiler methods. |
| 263 | func buildAgentOutputDownloadSteps(prefix string, pinAction func(string) string) []string { |
| 264 | safeOutputsStepsLog.Printf("Building agent output download steps with prefix: %q", prefix) |
| 265 | return buildArtifactDownloadSteps(ArtifactDownloadConfig{ |
| 266 | ArtifactName: prefix + constants.AgentArtifactName, // Unified agent artifact (prefixed in workflow_call) |
| 267 | ArtifactFilename: constants.AgentOutputFilename, // Filename inside the artifact directory |
| 268 | DownloadPath: constants.TmpGhAwDirSlash, |
| 269 | SetupEnvStep: true, |
| 270 | EnvVarName: "GH_AW_AGENT_OUTPUT", |
| 271 | StepName: "Download agent output artifact", |
| 272 | StepID: "download-agent-output", |
| 273 | }, pinAction) |
| 274 | } |