Microsoft GH-200 Practice Exam Questions & Answers
Microsoft GH-200 Exam Details
Key details for this exam, checked against the published exam outline
- Exam Code
- GH-200
- Full Name
- GitHub Actions
- Issuing Body
- Microsoft
- Question Format (Our Bank)
- Multiple Choice
- Delivery
- Online proctored through Pearson VUE
- Eligibility
- Intermediate level experience in GitHub Actions, including workflow creation, automation, and CI/CD pipeline management. Familiarity with CI/CD, GitHub repositories, GitHub Packages, and integrating third-party services is recommended.
- Full Question Set
- 157 questions Get All Questions
Free GH-200 Practice Questions
Answer each question, then see the correct answer and why it is right
Question 1 Domain 4 Manage GitHub Actions for the enterprise
Which statement correctly explains how labels can be used to direct GitHub Actions workflows to runners?
Self-hosted runners can carry default labels as well as custom labels. The runs-on field uses these labels to send workflow jobs to runners that satisfy the required conditions. If several labels are listed, a runner must possess all of them before GitHub Actions can allocate the job to it. For that reason, option A is the correct choice. Option B is false, since labels matter most for self-hosted runners. Option C is wrong because GitHub does not need the runner's IP address as a routing label. Option D is also wrong, as workflows select runners through labels or runner groups rather than hostname. This topic tests runner selection, self-hosted runner setup, and workflow job routing.
Question 2 Domain 1 Author and manage workflows
You are a DevOps engineer creating a composite action. One of its steps must run inside a subfolder. Which code snippet should you include in the composite action to set that folder?
In a composite action, the commands are listed under the runs.steps section of the action metadata file. When a particular command must run from a specific folder, the working-directory key is used, placed on that individual run step. Option D is the right choice because it keeps using: 'composite' under runs and sets working-directory: ${{ inputs.dir }} on the step that executes the script. Option A is wrong because directory is not a valid key for a run step in GitHub Actions. Option B wrongly places directory at the runs level. Option C uses the correct keyword but at the wrong level. This assesses composite action metadata syntax and proper step-level execution settings.
Question 3 Domain 1 Author and manage workflows
As a developer, you must ensure that only actions from trusted sources can be used within your GitHub Enterprise Cloud organization. Which of the statements below are accurate? (Choose three.)
Specific actions can be enabled for the organization by identifying them and setting version control, so that only trusted versions are run in workflows.
Verified actions from GitHub can be turned on at the enterprise level, adding a further safeguard by making sure only trusted actions are accessible to workflows.
Actions can be published to an internal marketplace, letting organizations share reusable actions securely within their enterprise without making them public.
Get the complete GH-200 question set
Get Full AccessQuestion 4 Domain 1 Author and manage workflows
A development team currently runs a PowerShell script on a Linux VM that is set up as a self-hosted runner. The script uses existing tools to compile and package their solution. The team wants to run this script unchanged inside an automated workflow. Which of the following should they do to call their script from a workflow step?
Because the self-hosted runner runs on a Linux VM and the script is written in PowerShell, the script can be launched with the pwsh (PowerShell Core) shell in a run step of the workflow. This allows the script to execute unchanged on the Linux runner, since PowerShell Core (pwsh) is cross-platform and supports Linux.
Question 5 Domain 3 Author and maintain actions
In which of the following situations would self-hosted runners be necessary in place of GitHub-hosted runners?
GitHub-hosted runners are capped at a certain number of simultaneous workflows (typically 20 on free-tier accounts and 5 on enterprise). When your organization must execute more workflows at the same time, self-hosted runners are needed to raise the amount of available parallel capacity.
Self-hosted runners let you set up specialized hardware or software environments that certain workflows depend on. GitHub-hosted runners might lack access to custom hardware such as GPUs or other specialty resources, which is why self-hosted runners are required in those situations.
Question 6 Domain 2 Consume and troubleshoot workflows
Which menu selections within a repository should you make to access a starter workflow that your organization has made available?
To use a starter workflow supplied by your organization, open the Actions tab in the repository and choose New workflow. From there you can either build a workflow from scratch or pick from a set of available workflow templates, which include the starter workflows your organization has published.
Question 7 Domain 1 Author and manage workflows
You are a DevOps engineer who must launch a deployment into separate environments, such as development and testing, based on the labels applied to a pull request. The deployment must target the releases branch and should start only when files inside the apps folder are modified. Which code block should be used to set up the trigger for this deployment workflow?
The trigger needs to rely on the pull_request event because the workflow responds to activity on a pull request. The activity in question is a label being applied, which means types: [labeled] is necessary. The deployment is aimed at the releases branch, so the branch filter should read branches: - 'releases'. The workflow should also execute only when changes occur in files within the apps folder, making paths: - 'apps/**' the proper recursive path filter. Option A is not valid since pull_request_label does not exist as a GitHub Actions event. Option B relies on the incorrect event, pull_request_review. Option C pairs an improper branch and path combination. GitHub workflow syntax allows event activity types, branch filters, and path filters to be combined together.
Question 8 Domain 1 Author and manage workflows
Which run: instruction correctly defines an output for a step?
GitHub Actions relies on the $GITHUB_OUTPUT file to hand data from one step over to later steps. Appending a key-value pair to that file with echo assigns the output variable (MY_OUTPUT) for the current step.
Practice every GH-200 question in the full set, each one with its verified answer and a detailed explanation
Get Full AccessWhat the Microsoft GH-200 Exam Covers
Exam domains verified against the Official Microsoft GH-200 exam guide, last checked December 2026.
Domain 1 Author and manage workflows
20% - 25%Configure workflow triggers for scheduled, manual, webhook, and repository events. Use jobs, steps, conditional logic, and strategy/matrix to generate job variations across OS and runtime versions. Implement YAML anchors and aliases to reuse mappings, and leverage predefined contexts like github, runner, env, and secrets to access workflow metadata and prevent secret leakage in logs.
Domain 2 Consume and troubleshoot workflows
15% - 20%Identify workflow triggers and diagnose failed runs using logs and run history. Expand YAML anchors and interpret matrix expansions to correlate job names to matrix axes. Locate workflows, artifacts, and logs in the UI and via API, then download and manage artifacts as needed.
Above Practice Question from this Domain: Q6
Domain 3 Author and maintain actions
15% - 20%Identify and implement action types: JavaScript, Docker, and composite. Specify required files, directory structure, and metadata, then implement workflow commands within actions. Select distribution models (public, private, or marketplace) and apply versioning and release strategies.
Above Practice Question from this Domain: Q5
Domain 4 Manage GitHub Actions for the enterprise
20% - 25%Define and manage reusable components and templates. Configure and monitor GitHub-hosted and self-hosted runners, apply IP allow lists, manage runner groups, and identify preinstalled software versions. Define and scope encrypted secrets and variables at organization, repository, and environment levels, then access and manage them programmatically via REST APIs.
Above Practice Question from this Domain: Q1
Domain 5 Secure and optimize automation
10% - 15%Use environment protections and approval gates. Identify trustworthy actions from the Marketplace and mitigate script injection through input sanitization and least-privilege permissions. Pin third-party actions to full commit SHAs, configure granular GITHUB_TOKEN permissions, and use OIDC tokens for cloud provider federation to eliminate long-lived secrets. Generate and verify artifact attestations for deployment verification.
GH-200 Exam FAQ
Common questions about the exam itself
What background do I need before taking GH-200?
How much time do I have to answer the questions on GH-200?
Is GH-200 harder than GH-900 (GitHub Foundations)?
Which domain in GH-200 gives candidates the most trouble?
How long should I study for GH-200?
How do I take GH-200 and what is exam day like?
What happens if I fail GH-200, and can I retake it?
How long does the GH-200 certification stay valid?
Which job role is GH-200 best for?
How does GH-200 fit into the broader GitHub certification track?
Other Microsoft Exams
Free practice questions for more Microsoft certification exams
