Reducing CI/CD Duplication with Reusable GitHub Actions Workflows
Your organization has multiple GitHub repositories that use shared workflows. You want to centrally manage these workflows and ensure they are always up to date. What is the recommended approach?
⚠ Common exam trap
AZ-400 often tests whether candidates confuse reusable workflows (native, referenced via 'uses') with submodules or API-based file copying — the trap is assuming any 'central storage' approach achieves the same result, when only reusable workflows provide live, version-controlled inheritance.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Create a central repository with reusable workflows and reference them using the 'uses' keyword in your workflows.
GitHub reusable workflows are the native mechanism for centralizing workflow logic across repositories. By storing workflows in a central repository and referencing them with the 'uses' keyword (e.g., 'uses: org/central-repo/.github/workflows/build.yml@main'), all consuming repositories automatically inherit updates when the central workflow changes. This eliminates duplication and ensures consistency without manual synchronization.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create a central repository with reusable workflows and reference them using the 'uses' keyword in your workflows.
Why this is correct
Reusable workflows are the official GitHub Actions pattern: you store a workflow file in a central repository and invoke it from other repositories using the `uses` keyword with a path like `owner/repo/.github/workflows/reusable.yml@ref`. This approach supports inputs, secrets, and version pinning, and is the recommended way to avoid duplicating CI/CD logic across many GitHub repositories.
- ✗
Use the GitHub API to push workflow files to each repository on a schedule.
Why it's wrong here
Using the GitHub API to programmatically push workflow files to each repository on a schedule is not recommended because it introduces high maintenance overhead, requires secure credentials for every repo, and can silently fail or create drift between repositories. It also bypasses the native versioning and audit trail of Git, making it a fragile and non-standard solution for sharing workflows.
- ✗
Download the workflows from a central blob storage and include them as inline scripts.
Why it's wrong here
Downloading workflow files from central blob storage and including them as inline scripts is not a supported pattern for workflow reuse. GitHub Actions executes steps inside a repository checkout; fetching external blobs at runtime is not equivalent to a reusable workflow and cannot leverage native features like workflow-level inputs, concurrency, or proper logging, so it is both unmaintainable and incorrect.
- ✗
Store the workflows in a separate repository and use Git submodules to include them.
Why it's wrong here
Using Git submodules to include workflow files is not a valid reuse mechanism because GitHub Actions only discovers workflow files in the `.github/workflows` directory of the base repository, and submodules are not checked out by default unless explicitly configured. Even when configured, submodules are intended for code dependencies, not for sharing Action workflow definitions, and this approach does not integrate with the reusable workflow engine.
Go deeper
Related to this question
Learn chapter
Implementing a Build Pipeline
Key term
GitHub
GitHub is a cloud-based platform for storing, tracking, and collaborating on code using Git version control.
Key term
Repository
A repository is a central storage location where software packages, code, or configuration files are kept, managed, and distributed for use by IT systems.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 696 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.