How would you migrate from Jenkins shared libraries to GitHub Actions reuse?
AdvancedScenarioReuse at Scale: Reusable Workflows & Actions
Answer
Situation read → Map concepts, not code line by line.
What I'd do →
- Inventory library functions and group them: whole-pipeline templates become reusable workflows, step helpers become composite actions, logic-heavy helpers (API calls, reporting) become JavaScript actions.
- Replace credentials with OIDC and environments,
inputapprovals with environment reviewers, agents with hosted or ARC runners. - Migrate a pilot service, run both systems in parallel for two weeks, compare durations and failures.
- Use GitHub Actions Importer to bootstrap conversions, then clean up.
Why → A structured mapping avoids reproducing Jenkins anti-patterns in YAML.
Interview tip → Mention running both in parallel; it shows migration discipline.
More on Reuse at Scale: Reusable Workflows & Actions
Forty microservice repos each have a slightly different copy of the same build workflow. How do you standardize?IntermediateA team wants to share "checkout, setup Java, Maven cache, run Sonar" steps. Reusable workflow or composite action?BeginnerA shared reusable workflow change broke 120 pipelines on Monday. How do you prevent a repeat?IntermediateA called reusable workflow needs a Sonar token, an npm token and AWS access. How do you pass them?AdvancedYou want to ensure only the central deploy workflow can assume the production AWS role, not arbitrary workflows in app repos. How?AdvancedYou need an action that comments a Terraform plan summary on PRs and must work on Linux and Windows. Which kind?Beginner