Interview Prep/GitHub Actions/Reuse at Scale: Reusable Workflows & Actions

A reusable workflow needs to return the deployed URL to the caller. How?

BeginnerScenarioReuse at Scale: Reusable Workflows & Actions
Answer

Situation read → Output mapping through two levels.

What I'd do →

  1. Step output, then job output, then workflow output:
    on:
      workflow_call:
        outputs:
          url:
            value: ${{ jobs.deploy.outputs.url }}
    jobs:
      deploy:
        outputs:
          url: ${{ steps.svc.outputs.url }}
    
  2. Caller reads needs.<calling-job>.outputs.url.

Why → Each boundary needs an explicit mapping.

Interview tip → Mention the jobs context exists only for this purpose.

All GitHub Actions questions Roadmap: GitHub Actions

More on Reuse at Scale: Reusable Workflows & Actions