Interview Prep/CI/CD/GitHub Actions

Your organization has 30 repos that all need the same build-and-push-image pipeline.

IntermediateScenarioGitHub Actions
Answer

Situation read → Duplicated workflows.

What I'd do →

  1. Create a central repo with a reusable workflow using on: workflow_call and typed inputs/secrets.
  2. Call it: uses: my-org/ci-workflows/.github/workflows/build.yml@v2 with with: and secrets: inherit (or explicit secrets).
  3. Version it by tag and update through Dependabot.

Why → Central maintenance with versioning, and callers keep a 10-line file.

Interview tip → Contrast reusable workflows (whole jobs) with composite actions (steps).

All CI/CD questions

More on GitHub Actions