In a monorepo, each service should run the same CI jobs when its directory changes. Which design is most maintainable?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Centralize job logic in reusable workflows; use path-filtered thin callers so each service triggers only when relevant files change.
Full explanation below image
Full Explanation
Reusable workflows DRY the pipeline while path filters (or change-detection jobs) limit which services run. Copy-paste drifts and multiplies CVE fixes across files. Rebuilding everything every minute wastes minutes and hides ownership. Local-only CI loses merge gates. Advanced setups generate a dynamic matrix of changed packages from a detect job. Keep secrets and permissions in the reusable workflow carefully documented for callers.