Courseiva
Design and implement build and release pipelinesmediumMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

Your organization uses GitHub Actions. You need to create a reusable workflow that builds and tests a Node.js application. Which approach should you use to define the workflow?

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

Define a reusable workflow with 'on: workflow_call'

Reusable workflows are defined in a separate file with workflow_call trigger. Option A is wrong because it defines a workflow that cannot be reused. Option B is wrong because actions are different from workflows. Option C is wrong because composite actions are for multiple steps, not entire workflows.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Define a standard workflow in .github/workflows/build.yml

    Why it's wrong here

    A standard workflow in .github/workflows/build.yml is triggered by repository events (e.g., push, pull_request) and cannot be invoked from another workflow; to be reusable it must explicitly define the workflow_call trigger, otherwise GitHub Actions treats it as a standalone event-driven workflow.

  • Use a composite action to encapsulate the build steps

    Why it's wrong here

    A composite action encapsulates multiple run/uses steps into a single step, but it is still just an action, not a workflow—it lacks its own triggers, job-level settings, and cannot be called as a top-level workflow from another repository; it is meant for grouping reusable step logic, not orchestrating jobs.

  • Create a custom action and reference it in multiple workflows

    Why it's wrong here

    A custom action is a reusable building block referenced via uses: in a step, but a single action is not a complete workflow and cannot define jobs, runners, or the workflow-level trigger (workflow_call); it is intended to be composed inside workflows, not to replace the workflow itself.

  • Define a reusable workflow with 'on: workflow_call'

    Why this is correct

    Defining a reusable workflow with on: workflow_call is correct because it makes the workflow callable from other workflows using the uses: syntax (e.g., uses: ./.github/workflows/build.yml), allowing you to create a standard build pipeline that can be referenced by many workflows without duplicating job definitions.

About these practice questions

Courseiva writes every AZ-400 question from scratch — 823 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.