Interview Prep/GitHub Actions/Reuse at Scale: Reusable Workflows & Actions

Forty microservice repos each have a slightly different copy of the same build workflow. How do you standardize?

IntermediateScenarioReuse at Scale: Reusable Workflows & Actions
Answer

Situation read → Copy-paste drift; fixes do not propagate.

What I'd do →

  1. Create devopsshack/platform-workflows with reusable workflows: build-image.yml, deploy-eks.yml, security-scan.yml, each with typed inputs and outputs.
  2. Set the repo's Actions access to "Accessible from repositories in the organization".
  3. Release with semver tags and a moving v1; consumers pin @v1 (or SHA with Renovate).
  4. Migrate repos with a scripted PR (gh CLI loop), starting with two pilot teams.
  5. Enforce a minimum baseline (scan workflow) through a ruleset "require workflows to pass".

Why → One fix lands everywhere with a version bump, and governance moves to the platform team.

Interview tip → Mention versioning and a migration plan; a central workflow without versions breaks everyone at once.

All GitHub Actions questions Roadmap: GitHub Actions

More on Reuse at Scale: Reusable Workflows & Actions