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

A called reusable workflow needs a Sonar token, an npm token and AWS access. How do you pass them?

AdvancedScenarioReuse at Scale: Reusable Workflows & Actions
Answer

Situation read → Secrets plus cloud identity across a workflow boundary.

What I'd do →

  1. Declare named secrets in workflow_call.secrets (SONAR_TOKEN, NPM_TOKEN) and pass explicitly from the caller.
  2. No AWS secret at all: caller job grants id-token: write, the called workflow runs configure-aws-credentials with a role ARN input.
  3. Trust policy can pin to the reusable workflow via job_workflow_ref claim if the org customizes sub.

Why → Explicit secrets document the contract; OIDC removes the most dangerous secret.

Interview tip → Mention why secrets: inherit is avoided across team boundaries.

All GitHub Actions questions Roadmap: GitHub Actions

More on Reuse at Scale: Reusable Workflows & Actions