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 →
- Write a reusable workflow with
on: workflow_callin a central repo. - Call it:
jobs:
ci:
uses: acme/.github/.github/workflows/node-ci.yml@v2
with:
node-version: 22
secrets: inherit
- Version it with tags and pin callers to
@v2. - 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.
More on Scale, Submodules, LFS and GitHub Automation
A monorepo has 4 GB of history and developers only touch one service. How do you make their day-to-day faster?IntermediateDesigners commit PSD and video assets, and the repo keeps growing. How do you move them to Git LFS?IntermediateYour GitHub LFS bandwidth quota is exhausted and CI pulls fail. What do you do?AdvancedA repository uses a submodule. How does a developer get the right version of it?BeginnerSubmodules, subtree or a package manager for sharing code between repos?IntermediateCI cannot clone a private submodule: authentication fails in `actions/checkout`.Intermediate