Summer Certification Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: pass65

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.

Questions 4

As a DevOps engineer, you are trying to leverage an organization secret in a repo. The value received in the workflow is not the same as that set in the secret. What is the most likely reason for the difference?

Options:

A.

There is a different value specified at the rego level.

B.

There is a different value specified at the workflow level.

C.

The Codespace secret doesn ' t match the expected value.

D.

The Encrypt Secret setting was not configured for the secret.

E.

There is a different value specified at the enterprise level.

Buy Now
Questions 5

Which two actions ensure that a GitHub Actions workflow can be triggered manually? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

Options:

A.

Define a workflow_dispatch event and specify inputs that enable users to provide values when triggering the workflow manually.

B.

Use a schedule event and add a manual: false parameter.

C.

Define a workflow_dispatch event in the on field of the workflow YAML file.

D.

Trigger a workflow manually by using a workflow_call event that has a button on the UI.

Buy Now
Questions 6

In which locations can actions be referenced by workflows? (Choose three.)

Options:

A.

a separate public repository

B.

an .action extension file in the repository

C.

the same repository as the workflow

D.

a published Docker container image on Docker Hub

E.

the runs-on: keyword of a workflow file

F.

the repository ' s Secrets settings page

G.

a public NPM registry

Buy Now
Questions 7

Which of the following is the best way for an enterprise to prevent certain marketplace actions from running?

Options:

A.

Create a list of the actions that are restricted from being used as an enterprise policy. Every other action can be run.

B.

It is not possible; if an action is in the marketplace, its use cannot be restricted.

C.

Create a list that is maintained as a . yml file in a . github repository specified in the enterprise. Only these actions can be run.

D.

Create a list of the actions that are allowed to run as an enterprise policy. Only these actions can be run.

Buy Now
Questions 8

How can GitHub Actions encrypted secrets be used in if: conditionals within a workflow job?

Options:

A.

Set the encrypted secret as a job-level environment variable and then reference the environment variable within the conditional statement.

B.

Create a job dependency that exposes the encrypted secret as a job output, which can then be leveraged in a subsequent dependent job.

C.

Use the secrets context within the conditional statement, e.g. ${{ secrets.MySuperSecret }}.

D.

Use a workflow command to expose the encrypted secret via a step ' s output parameter and then use the step output in the job ' s if: conditional.

Buy Now
Questions 9

Which workflow commands send information from the runner? (Choose two.)

Options:

A.

reading from environment variables

B.

setting a debug message

C.

populating variables in a Dockerfile

D.

setting output parameters

Buy Now
Questions 10

What menu options in a repository do you need to select in order to use a starter workflow that is provided by your organization?

Options:

A.

Actions > Load workflow

B.

Workflow > New workflow

C.

Workflow > Load workflow

D.

Actions > New workflow

Buy Now
Questions 11

You create a self-hosted runner labeled as runner1.

You need to ensure that a GitHub Actions workflow job runs only on runner1.

Which YAML statement should you use?

Options:

A.

runs-on: [self-hosted, linux-xlarge]

B.

runs-on: - self-hosted - ubuntu-latest

C.

runs-on: [self-hosted, runner1]

D.

runs-on: self-hosted

Buy Now
Questions 12

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.)

Options:

A.

A workflow sends requests to a service that is down.

B.

A workflow error produces too many, or wrong, requests, impacting external services negatively.

C.

A workflow is configured to run on self-hosted runners

D.

A workflow needs to be changed from running on a schedule to a manual trigger

E.

A runner needs to have diagnostic logging enabled.

Buy Now
Questions 13

Which statement accurately describes using labels to route GitHub Actions workflows to runners?

Options:

A.

A user can assign multiple labels to a self-hosted runner and use the labels in a runs-on to target only runners that match all the specified labels.

B.

Labels apply only to GitHub-hosted runners and are ignored by self-hosted runners.

C.

GitHub Actions automatically assigns the runner’s IP address as a label, and the label must be used in a runs-on.

D.

To target a specific runner, the runs-on must match the runner’s hostname rather than its labels.

Buy Now
Questions 14

Which of the following scenarios requires a developer to explicitly use the GITHUB_TOKEN or github.token secret within a workflow? (Choose two.)

Options:

A.

passing the GITHUB_TOKEN secret to an action that requires a token as an input

B.

making an authenticated GitHub API request

C.

checking out source code with the actions/checkout@v3 action

D.

assigning non-default permissions to the GITHUB_TOKEN

Buy Now
Questions 15

You are a DevOps engineer working on a custom action. You want to conditionally run a script at the start of the action, before the main entrypoint. Which code block should be used to define the metadata file for your custom action?

Options:

A.

runs:

using: ' node16 '

start: ' start.js '

start-if: github.event_name == ' push '

main: ' index.js '

B.

runs:

using: ' node16 '

pre: ' start.js '

pre-if: github.event_name == ' push '

main: ' index.js '

C.

runs:

using: ' node16 '

pre-if: github.event_name == ' push ' then ' start.js '

main: ' index.js '

D.

runs:

using: ' node16 '

before: ' start.js '

before-if: github.event_name == ' push '

main: ' index.js '

Buy Now
Questions 16

How many jobs will result from the following matrix configuration?

GH-200 Question 16

Options:

A.

3 jobs

B.

4 jobs

C.

5 jobs

D.

6 jobs

Buy Now
Questions 17

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?

Options:

A.

check_run

B.

workflow_run

C.

workflow_call

D.

pull_request

Buy Now
Questions 18

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?

Options:

A.

Add a run step to your workflow, which dynamically installs and configures Redis as part of your job.

B.

Specify container: and services: in your job definition to leverage a Redis service container.

C.

Set up Redis on a separate machine and reference that instance from your job.

D.

Install Redis on the hosted runner image and place it in a runner group. Specify label: in your job to target the runner group.

Buy Now
Questions 19

As a developer, you need to integrate a GitHub Actions workflow with a third-party code quality provider that uses the Checks API. How should you trigger a follow-up workflow?

Options:

A.

Add the workflow_run webhook event as a trigger for the workflow for the code quality integration name

B.

Add the check_run webhook event as a trigger for the workflow when the code quality integration is completed

C.

Add the pull_request webhook event as a trigger for the workflow when the code quality integration is synchronized

D.

Add the deployment webhook event as a trigger for the workflow when the code quality integration is completed

Buy Now
Questions 20

How should you install the bats NPM package in your workflow?

A)

GH-200 Question 20

B)

GH-200 Question 20

C)

GH-200 Question 20

D)

GH-200 Question 20

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 21

Your organization is managing secrets using GitHub encrypted secrets, including a secret named SuperSecret. As a developer, you need to create a version of that secret that contains a different value for use in a workflow that is scoped to a specific repository named MyRepo. How should you store the secret to access your specific version within your workflow?

Options:

A.

Create a duplicate entry for SuperSecret in the encrypted secret store and specify MyRepo as the scope.

B.

Create MyRepo_SuperSecret in GitHub encrypted secrets to specify the scope to MyRepo.

C.

Create a file with the SuperSecret. information in the .qithub/secrets folder in MyRepo.

D.

Create and access SuperSecret from the secrets store in MyRepo.

Buy Now
Questions 22

Which of the following commands will set the $FOO environment variable within a script, so that it may be used in subsequent workflow job steps?

Options:

A.

run: echo " ::set-env name=FOO::bar "

B.

run: echo " FOO=bar " > > $GITHUB_ENV

C.

run: echo ${{ $FOO=bar }}

D.

run: export FOO=bar

Buy Now
Questions 23

As a developer, you want to run a workflow from the Actions tab in GitHub. Which YAML snippet should you use to match the interface in this image?

GH-200 Question 23

A)

GH-200 Question 23

B)

GH-200 Question 23

C)

D)GH-200 Question 23

GH-200 Question 23

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 24

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 to implement the conditional execution of the job?

Options:

A.

jobs:

deploy:

if: github.ref_name == ' feature-branch '

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3

B.

jobs:

deploy:

if: github.ref.name == ' feature-branch '

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3

C.

jobs:

deploy:

if: github.branch_name == ' feature-branch '

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3

D.

jobs:

deploy:

if: github.branch.name == ' feature-branch '

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3

Buy Now
Questions 25

As a developer, what options should you recommend to implement standards for automation reuse? (Choose two.)

Options:

A.

Create workflow templates and store them in the organization ' s .github repository.

B.

Create reusable actions and workflows that can be called from other workflows.

C.

Create a marketplace partition to publish reusable automation for the company.

D.

Store shared corporate actions in subfolders in a defined and documented internally accessible repository.

Buy Now
Questions 26

Which of the following scenarios would require the use of self-hosted runners instead of GitHub-hosted runners?

Options:

A.

running more than the three concurrent workflows supported by GitHub-hosted runners

B.

exceeding 50,000 monthly minutes of build time

C.

using Docker containers as part of the workflow

D.

using specialized hardware configurations required for workflows

E.

performing builds on macOS

Buy Now
Questions 27

In which of the following scenarios should you use self-hosted runners? Each correct answer presents a complete solution.

NOTE: Each correct answer is worth one point.

Options:

A.

when the workflow jobs must be run on Windows 10

B.

when jobs must run for longer than 6 hours

C.

when you want to use macOS runners

D.

when GitHub Actions minutes must be used for the workflow runs

E.

when a workflow job needs to install software from the local network

Buy Now
Questions 28

Where should workflow files be stored to be triggered by events in a repository?

Options:

A.

.github/workflows/

B.

.github/actions/

C.

Nowhere; they must be attached to an act on in the GitHub user interface

D.

anywhere

E.

.workflows/

Buy Now
Questions 29

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.)

Options:

A.

Delete artifacts from the repositories manually

B.

Disable branch protections in the repository.

C.

Use self-hosted runners for all workflow runs.

D.

Configure the artifact and log retention period.

E.

Configure the repo to use Git Large File Storage.

Buy Now
Questions 30

What is the most secure way to store sensitive information in GitHub Actions workflows?

Options:

A.

Use environment variables in the workflow and store sensitive data directly in the variables.

B.

From the GitHub repository settings, store sensitive data as unencrypted text.

C.

Store the sensitive information as plain text in the workflow YAML file.

D.

Use GitHub Enterprise Managed User (OIDC) integration to dynamically fetch secrets from a third-party secrets manager.

Buy Now
Exam Code: GH-200
Exam Name: GitHub Actions Exam
Last Update: Aug 5, 2026
Questions: 100

PDF + Testing Engine

$64.99   $185.69

Testing Engine

$49.99   $142.83

PDF (Q&A)

$54.99   $157.11