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

Consumers of your reusable workflow need different runners (hosted for most, ARC for one team). How?

BeginnerScenarioReuse at Scale: Reusable Workflows & Actions
Answer

Situation read → runs-on must be configurable.

What I'd do →

  1. Input runner with default:
    inputs:
      runner: { type: string, default: ubuntu-24.04 }
    jobs:
      build:
        runs-on: ${{ inputs.runner }}
    
  2. For label arrays, accept a JSON string and use fromJSON(inputs.runner).

Why → runs-on supports inputs context in reusable workflows.

Interview tip → Mention the JSON trick for multiple labels.

All GitHub Actions questions Roadmap: GitHub Actions

More on Reuse at Scale: Reusable Workflows & Actions