Job 'build' produces an output named 'image-tag'. Job 'deploy' depends on 'build'. Which expression accesses the image-tag value in 'deploy'?
Select an answer to reveal the explanation.
Short Explanation and Infographic
The 'needs' context is the inter-job communication channel — it holds everything the jobs you depend on produced.
Full explanation below image
Full Explanation
Downstream jobs access outputs from their dependencies using the 'needs' context: '${{ needs.<job_id>.outputs.<output_name> }}'. The 'needs' context only contains jobs listed in the current job's 'needs:' array. 'jobs.*' context only exists in 'if:' expressions for whole-job level conditions, not in step-level expressions. 'upstream.' and 'depends.' are not valid context prefixes. The job must explicitly declare its outputs under 'outputs:' at the job level for them to be accessible via 'needs'.