Interview Prep/Git & GitHub/Scale, Submodules, LFS and GitHub Automation

Fifty repositories copy-paste the same CI workflow. How do you maintain it centrally?

IntermediateScenarioScale, Submodules, LFS and GitHub Automation
Answer

Situation read → Copies drift, and fixes need fifty PRs.

What I'd do →

  1. Write a reusable workflow with on: workflow_call in a central repo.
  2. Call it:
jobs:
  ci:
    uses: acme/.github/.github/workflows/node-ci.yml@v2
    with:
      node-version: 22
    secrets: inherit
  1. Version it with tags and pin callers to @v2.
  2. Use organisation workflow templates for new repos.

Why → One place to patch, versioned like a library.

Interview tip → Know when a composite action fits better: it bundles steps, not whole jobs.

All Git & GitHub questions Roadmap: Git & GitHub

More on Scale, Submodules, LFS and GitHub Automation