Interview Prep/CI/CD/GitHub Actions and GitLab CI in Production

How do you avoid workflow sprawl and duplicated YAML in large GitHub repos?

BeginnerProductionGitHub Actions and GitLab CI in Production
Answer

Extract repeated step sequences into composite actions and whole pipelines into reusable workflows, use matrices instead of copy-paste jobs, set defaults.run once, and keep YAML anchors in mind: GitHub Actions now supports YAML anchors in workflow files. Name workflows clearly, keep one purpose per workflow (ci, release, nightly, security), and delete workflows no one uses.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitHub Actions and GitLab CI in Production