Free Practice Questions for the Microsoft GitHub Administrator GH-200 Exam (2026 Updated)
At Marks4sure, we are dedicated to providing IT professionals with the most accurate and reliable preparation materials for the Microsoft GH-200 exam. To support your certification journey, we have made a selection of our premium 2026 GitHub Administrator practice questions and answers available completely free. You can take this practice test as many times as you need. Every question includes a detailed, expertly verified explanation to ensure you fully grasp the core security concepts before test day.
You are a DevOps engineer working on deployment workflows. You need to execute the deploy job only if the current branch name is feature-branch. Which code snippet will help you implement the conditional execution of the job?
Which command can you include in your workflow file to set the output parameter for an action?
As a developer, what options should you recommend to implement standards for automation reuse? (Choose two.)
What is the most suitable action type for a custom action written in TypeScript?
As a developer, which workflow steps should you perform to publish an image to the GitHub Container Registry? (Choose three.)
As a developer, you need to leverage Redis in your workflow. What is the best way to use Redis on a self-hosted Linux runner without affecting future workflow runs?
Which files are required for a Docker container action in addition to the source code? (Choose two.)
Which workflow command would output the debug message " action successfully debugged " ?
As a developer, one of your workflows requires Xcode version 11.2 hosted on macOS Catalina (version 10.15). You have already created and configured a self-hosted runner to conform to those requirements and registered it with your organization. What else should you do to ensure that the workflow accesses the correct runner instance?
(Each correct answer presents part of the solution. Choose three.)
You are a DevOps engineer in ABC Corp. You need to schedule your deployment workflow twice a week at 7:45 UTC every Wednesday and Saturday. What is the appropriate YAML structure?
As a developer, your Actions workflow often reuses the same outputs or downloaded dependencies from one run to another. To cache dependencies for a job, you are using the GitHub cache action. Which input parameters are required for this action? (Choose two.)
You are reaching your organization ' s storage limit for GitHub artifacts and packages. What should you do to prevent the storage limit from being reached? (Choose two.)
You are a developer working on developing reusable workflows for your organization. What keyword should be included as part of the reusable workflow event triggers?
As a developer, you need to create a custom action written in Python. Which action type should you choose?
As a developer, you need to create a custom action written in Python. Which action type should you choose?
You are a DevOps engineer working on custom Actions development. You need to handle errors or exceptions as part of the JavaScript-based action code. What should be added to the following code block to handle errors?
const core = require( ' @actions/core ' );
try {
// action code
} catch (error) {
// insert snippet here
}
How can a workflow deployment mitigate the risk of multiple workflow runs deploying to a single cloud environment simultaneously?
(Each correct answer presents part of the solution. Choose two.)
You installed specific software on a Linux self-hosted runner. You have users with workflows that need to be able to select the runner based on the identified custom software. Which steps should you perform to prepare the runner and your users to run these workflows? (Choose two.)
As a developer, you are authoring a workflow that will deploy to both DevCloud and TestCloud resources. Each cloud resource is accessed with a different deployment key. Which approach best allows you to use the same reusable workflow in separate jobs to target the different cloud resources?
Which choices represent best practices for publishing actions so that they can be consumed reliably? (Choose two.)
Which of the following scenarios would require the use of self-hosted runners instead of GitHub-hosted runners?
Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. In which scenarios would temporarily disabling a workflow be most useful? (Choose two.)
You need to make a script to retrieve workflow run logs by using the API. Which is the correct API endpoint to download a workflow run log?
What is the most secure way to store sensitive information in GitHub Actions workflows?
As a developer, you are optimizing a GitHub workflow that uses and produces many different files. You need to determine when to use caching versus workflow artifacts. Which two statements are true? (Choose two.)
A single secret must be accessed by workflows in specific repositories. What is the best way to create the secret?
As a DevOps engineer, you need to execute a deployment to different environments such as development and testing based on labels added to a pull request. The deployment should use the releases branch and trigger only when there is a change in files under the apps folder. Which code block should be used to define the deployment workflow trigger?
Custom environment variables can be defined at multiple levels within a workflow file, including which three levels?
(Each correct answer presents a complete solution. Choose three.)
You are a developer working on developing reusable workflows for your organization. What keyword should be included as part of the reusable workflow event triggers?
As a developer, which of the following snippets will enable you to run the commands npm ci and npm run build as part of a workflow?
What are the two most significant advantages of adding documentation while distributing custom actions? Each correct answer presents a complete solution.
NOTE: Each correct answer is worth one point.
You are a developer, and your container jobs are failing on a self-hosted runner. Which requirements must you check to ensure that the self-hosted runner is properly configured? (Choose two.)
In the following workflow file, line 5 interprets lines 3 and 4 as Python. Which of the following is a valid option to complete line 5?
1 steps:
2 - run: |
3 import os
4 print(os.environ[ ' PATH ' ])
5