GH-200 domain - 18% of the exam

Consume and troubleshoot workflows

Consume and troubleshoot workflows is 18% of the GH-200 exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

49
Practice questions
6
Objectives
40
Medium
9
Hard

Where people go wrong

  • Treating a starter workflow as a shared definition

    The wrong answers treat a starter workflow as a live link, or offer a reusable workflow when a repository should own its copy. A reusable workflow stays the source of truth in one file, so a single edit updates every caller. A starter workflow is copied once into the repository's .github/workflows directory when chosen from the Actions tab. The repository then edits it freely, and later template changes never propagate to it.

    See it in a sample question
  • Mixing up composite actions and reusable workflows

    The wrong answers offer a reusable workflow where a few steps need packaging, or a composite action where whole build-and-test workflows need centralising. A composite action bundles steps that a job invokes through a single uses step, and it cannot define its own jobs, a matrix or triggers. A reusable workflow, defined with workflow_call, is called at job level with uses and runs as its own job.

    See it in a sample question
  • Confusing disabling, deleting and cancelling a workflow

    The wrong answers use cancelling, deleting or commenting out a schedule where disabling fits, and disabling where deletion fits. Disabling from the Actions tab stops every trigger, including the schedule, while keeping the file and its run history for later re-enabling. Deleting the file and committing the removal takes the workflow off the Actions tab, leaving its definition only in git history. Cancelling stops one in-progress run, and the next scheduled run still starts.

    See it in a sample question
  • Assuming a re-run starts fresh

    The wrong answers treat a re-run as a new run on newer code, or as one that discards work already done. Re-run failed jobs stays within the same run, retries the failed jobs and their dependants, and keeps the results of passing jobs. Re-run all jobs repeats every job. Any re-run replays the original commit and triggering event, so newer commits on the branch are excluded. A new commit starts a separate run instead.

    See it in a sample question
  • Misreading YAML anchor, alias and merge-key resolution

    The wrong answers expect a merge key to overwrite local values, the later of two merged maps to win, or an alias to be extended inline. A merge key only fills keys the node does not already define, so a directly written timeout-minutes of 30 beats the anchored 10. When a merge key lists several anchors, the earlier one wins, so LOG_LEVEL resolves to info. An alias substitutes the whole anchored sequence, so three node values with two os values give six jobs.

    See it in a sample question

Objectives in this domain

What to study

The official documents this domain's practice questions cite most.

Sample questions from this domain

Free sampleConsume and troubleshoot workflowsmedium

An engineer selected an organisation starter workflow from the Actions tab three months ago, edited the copied file heavily for the repository, and now the platform team has improved the original template. The engineer expects the repository's workflow to reflect those upstream improvements automatically. Which statement correctly describes what happens to the repository's copy?

  • AThe repository's copy updates on the next workflow run, because a starter workflow keeps a reference to its template and pulls in the latest template version each time the workflow is triggered.
  • BThe repository's copy stays exactly as it was edited, because selecting a starter workflow makes a one-time copy with no live link, so later template changes never flow into the repository automatically. Correct
  • CThe repository's local edits are overwritten when the template changes, because the organisation template is treated as the source of truth and resynchronises owned copies on a schedule.
  • DThe repository must reselect the starter workflow to merge the changes, because GitHub offers an automatic three-way merge that combines the new template with the repository's existing edits.
Recognise that a starter workflow is a one-time copy the repository owns, so upstream template changes never propagate automatically. Selecting a starter workflow copies the template into the repository's .github/workflows directory once, and from that moment the repository owns and maintains the file independently. There is no live link back to the template, so later improvements to the organisation template do not flow into the copied file and the repository's own edits are never overwritten or merged automatically.

Why A is wrong: Tempting because reusable workflows do track an upstream reference, but a starter workflow is a one-time copy with no live link, so it does not pull template changes on a run.

Why B is correct: A starter workflow is copied once into the repository at selection time, so the repository owns that file outright and upstream template edits do not propagate to it automatically.

Why C is wrong: Tempting because central governance often overwrites copies, but a starter workflow grants full ownership to the repository and never resynchronises or discards the repository's own edits.

Why D is wrong: Tempting because reselecting could fetch the newer template, but GitHub performs no automatic merge with existing edits and would create a separate new file rather than merging into the customised one.

Free sampleConsume and troubleshoot workflowsmedium

A team has three short, identical shell steps that check out code, install a linter, and run it, and they repeat across several jobs in the same workflow. They want to package just those steps so a single job can invoke them in one step, without introducing a separate trigger or a full job definition. Which construct is the right fit?

steps:
  - uses: ./.github/actions/lint
    with:
      path: src
  • AA composite action stored under .github/actions, which bundles the three steps so a job references it with a single uses step and passes a path input through with. Correct
  • BA starter workflow placed under workflow-templates in the organisation .github repository, which packages the three steps so a job can run them as a single template.
  • CA reusable workflow invoked through workflow_call, which packages the three steps so the calling job runs them as a single step within its existing job.
  • DA matrix strategy on the existing job, which packages the three steps so they run as a single combination and removes the need to repeat them across jobs.
Use a composite action to bundle several steps into one reusable unit a job invokes with a single uses step. A composite action packages multiple run and uses steps into a single action that a job invokes through one uses step and parameterises through with, which is the correct level of reuse for a handful of repeated steps inside a job. A starter workflow scaffolds a whole workflow at creation time, a reusable workflow runs as its own job called at job level rather than as a step, and a matrix only fans a job across parameter combinations.

Why A is correct: A composite action groups multiple steps into one action that a job invokes as a single uses step, accepting inputs through with, which is exactly the step-level packaging the team needs without a separate trigger or job.

Why B is wrong: Tempting because starter workflows bundle reusable content, but they scaffold an entire workflow at creation time rather than steps a running job invokes, so they cannot be referenced from a job's uses step at run time.

Why C is wrong: Tempting because workflow_call shares logic, but a reusable workflow runs as its own job called at job level, not as a step inside an existing job, so it cannot be embedded as one step among other steps.

Why D is wrong: Tempting because a matrix reduces repetition, but it fans a job out across parameter combinations rather than bundling steps for reuse, so it does not turn the three steps into a single invokable unit.

Free sampleConsume and troubleshoot workflowsmedium

A maintainer wants to stop a noisy scheduled workflow from running for a few weeks while an upstream dependency is fixed, then bring it back unchanged with its run history intact. Which action on the workflow meets this need with the least disruption?

  • ADelete the workflow file from the default branch, which stops the schedule immediately and lets the maintainer restore the exact file from git history once the upstream dependency is fixed.
  • BComment out the schedule block in the workflow file and commit the change, which suspends only the scheduled trigger while leaving any other triggers and the run history untouched.
  • CCancel each scheduled run from the run page as it starts, which prevents the workflow completing while keeping the file and run history available for inspection afterwards.
  • DDisable the workflow from the Actions tab, which stops it triggering on its schedule and other events while preserving the workflow file and its past run history for later re-enabling. Correct
Disable a workflow to suspend all of its triggers temporarily while keeping the file and run history for later re-enabling. Disabling a workflow from the Actions tab stops it from triggering on any event, including a schedule, but leaves the workflow file in the repository and its run history in place, so it can be re-enabled later and resume unchanged. Deleting removes the file and detaches its history, commenting out the schedule edits the file and leaves other triggers active, and cancelling individual runs is a manual per-run action that does not suspend the workflow.

Why A is wrong: Tempting because git would still hold the file, but deleting it removes the workflow and its run history from the Actions view, so restoring later means recommitting the file and losing the continuity of the previous run history.

Why B is wrong: Tempting because commenting out the schedule does stop timed runs, but it edits the workflow file and leaves other triggers active, so it changes the file the maintainer wanted to keep unchanged and does not fully stop the workflow.

Why C is wrong: Tempting because cancelling stops an in-progress run, but it does not prevent the next scheduled run from starting, so the maintainer would have to keep cancelling runs manually for the whole period rather than suspending the workflow.

Why D is correct: Disabling a workflow halts all of its triggers, including the schedule, without removing the file or its run history, so the maintainer can re-enable it later and resume runs exactly as before.

Free sampleConsume and troubleshoot workflowsmedium

A workflow run failed two days ago on commit abc123. Since then several newer commits have landed on the branch. An engineer clicks Re-run all jobs on the original failed run and wants to predict which code and event the re-run executes against. What behaviour should they expect?

  • AThe re-run executes against the same commit abc123 and the same triggering event as the original run, so the newer commits on the branch are not included in the re-run. Correct
  • BThe re-run executes against the latest commit on the branch and re-evaluates the trigger as a fresh push, so it reflects all of the newer commits landed since the original failure.
  • CThe re-run merges the original commit abc123 with the latest branch commit and runs against the combined tree, replaying the original event so newer fixes are partially included.
  • DThe re-run starts against whatever commit is current at re-run time but keeps the original run identifier, so the code is new while the event metadata stays unchanged from the failure.
Predict that re-running a failed workflow replays the original commit and event rather than advancing to newer branch commits. Re-running an existing workflow run reuses the commit SHA and the event payload that produced the original run. It does not advance to the latest commit on the branch and does not merge the original commit with newer ones. An engineer who re-runs the failed run on abc123 therefore tests exactly the code and event that first failed, which is why a fix pushed afterwards is only validated by a new run on the newer commit, not by re-running the old one.

Why A is correct: Re-running a workflow replays it with the original commit SHA and triggering event, so it tests the same code that first failed and ignores any commits pushed afterwards.

Why B is wrong: Tempting because a re-run feels like starting over, but re-running reuses the original commit and event rather than advancing to the newest branch commit.

Why C is wrong: Tempting because GitHub merges refs for some pull-request events, but a re-run performs no such merge; it reuses the exact original commit unchanged, not a combined tree.

Why D is wrong: Tempting because the run identifier is preserved, but the commit is not advanced; the re-run uses the original commit, so the code is not the newer branch state.

Free sampleConsume and troubleshoot workflowshard

A workflow author defines a YAML anchor on a sequence of node versions and then aliases it inside the matrix node axis, while os lists two values. When the matrix is analysed, how many jobs does this expansion produce?

versions: &node_versions
  - 18
  - 20
  - 22
strategy:
  matrix:
    os: [ubuntu-latest, windows-latest]
    node: *node_versions
  • ASix jobs, because the alias resolves to the three-version sequence before expansion, giving a node axis of three values that multiplies with the two os values as a Cartesian product. Correct
  • BThree jobs, because the aliased sequence is treated as a single combined node value, so each os pairs with that one merged list to yield one job per os plus a shared job.
  • CFive jobs, because the alias adds the three node versions to the two os values as separate axes that are summed rather than multiplied during the matrix expansion.
  • DTwo jobs, because resolving the alias collapses the node axis to its anchor name, leaving os as the only varying axis and producing exactly one job for each os value.
Predict matrix expansion by resolving a YAML alias to its anchored list before computing the Cartesian product of axes. YAML resolves the alias to a copy of the anchored sequence during parsing, so by the time the matrix is evaluated node is an ordinary list of three values. A matrix forms the Cartesian product of its axes, so two os values multiplied by three node values expand into six jobs. The alias neither collapses the list to one value nor turns the axes into a sum.

Why A is correct: An alias is substituted with the anchored sequence during parsing, so node carries three values, and the matrix multiplies the two os values by the three node values to expand into six jobs.

Why B is wrong: Tempting because the alias points at one sequence, but an alias substitutes the full list before expansion, so node still holds three distinct values rather than one combined value.

Why C is wrong: Tempting because two plus three is five, but matrix axes form a Cartesian product and are multiplied, not added, so summing the axis lengths is not how expansion counts jobs.

Why D is wrong: Tempting because the anchor has a single name, but the alias expands to the underlying three-item list, so node remains a three-value axis and the count is greater than two.

Other domains in this exam

See also the GH-200 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by GitHub. Original, blueprint-aligned practice material only.