Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmaspas7

Easiest Solution 2 Pass Your Certification Exams

GH-200 Microsoft GitHub Actions Exam Free Practice Exam Questions (2025 Updated)

Prepare effectively for your Microsoft GH-200 GitHub Actions Exam certification with our extensive collection of free, high-quality practice questions. Each question is designed to mirror the actual exam format and objectives, complete with comprehensive answers and detailed explanations. Our materials are regularly updated for 2025, ensuring you have the most current resources to build confidence and succeed on your first attempt.

Page: 1 / 2
Total 72 questions

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

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.

Which workflow command would output the debug message "action successfully debugged"?

A.

echo :debug::message=action successfully debugged"

B.

echo "debug-action successfully debugged"

C.

echo "::debug::action successfully debugged"

D.

echo ":debug:action successfully debugged:"

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?

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.

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

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Which scopes are available to define custom environment variables within a workflow file? (Choose three.)

A.

the entire workflow, by using env at the top level of the workflow file

B.

all jobs being run on a single Actions runner, by using runner.env at the top of the workflow file

C.

the entire stage, by using env at the top of the defined build stage

D.

within the run attribute of a job step

E.

the contents of a job within a workflow, by using jobs..env

F.

a specific step within a job, by using jobs..steps[*].env

Which default environment variable specifies the branch or tag that triggered a workflow?

A.

GITHUB_TAG

B.

GITHUB_REF

C.

ENV_BRANCH

D.

GITHUB_BRANCH

Which action type should be used to bundle a series of run steps into a reusable custom action?

A.

Composite action

B.

Bash script action

C.

Docker container action

D.

JavaScript action

A.

Scheduled workflows run on the:

B.

latest commit and branch on which the workflow was triggered,

C.

latest commit from the branch named schedule,

D.

latest commit from the branch named main,

E.

specified commit and branch from the workflow YAML file,

F.

latest commit on the default or base branch

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

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.

Which files are required for a Docker container action in addition to the source code? (Choose two.)

A.

Dockerfile

B.

Actionfile

C.

metadata.yml

D.

action.yml

Which run: command will set a step's output?

A.

run: echo "MY_OUTPUT=foo" >> $GITHUB_OUTPUT

B.

run: export MY_OUTPUT=foo

C.

run: echo ${{ $GITHUB_OUTPUT=foo }}

D.

run: echo "::set-env name=MY OUTPUT::foo"

As a developer, you have a 10-MB data set that is required in a specific workflow. Which steps should you perform so the dataset is stored encrypted and can be decrypted during the workflow? (Choose three.)

A.

Encrypt the dataset.

B.

Leverage the actions/download-secret action in the workflow.

C.

Store the dataset in a GitHub encrypted secret.

D.

Store the encryption keys in a GitHub encrypted secret.

E.

Compress the dataset

F.

Commit the encrypted dataset to the same repository as the workflow

G.

Create a GitHub encrypted secret with the Large object option selected and upload the dataset.

What is the minimal syntax for declaring an output named foo for an action?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

As a DevOps engineer, you are developing a container action. You need to execute a cleanup script after completing the main script execution. Which code block should be used to define the cleanup script?

A.

B.

C.

D.

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

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/

What will the output be for the following event trigger block in a workflow?

A.

It throws a workflow syntax error, pointing to the types definition in issue_comment event.

B.

It throws a workflow syntax error, pointing to the types definition in issues event.

C.

It runs the workflow when an issue is edited or when an issue comment created.

D.

It runs the workflow when an issue or issue comment in the workflow's repository is created or modified.

E.

It runs the workflow when an issue is created or edited, or when an issue or pull request comment is created.

As a developer, you want to review the step that caused a workflow failure and the failed step's build logs. First navigate to the main page of the repository on GitHub. Which section contains the step failure information?

A.

Insights

B.

Code

C.

Actions

D.

Pull requests

E.

Issues

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

A.

dependency: the name and version of a package to cache or restore

B.

key: the key created when saving a cache and the key used to search for a cache

C.

cache-hit: the copy action key used with restore parameter to restore the data from the cache

D.

path: the file path on the runner to cache or restore

E.

ref: the ref name of the branch to access and restore a cache created

F.

restore-keys: the copy action key used with cache parameter to cache the data

Which workflow event is used to manually trigger a workflow run?

A.

create

B.

workflow_dispatch

C.

workflow_run

D.

status

When reviewing an action for use, what file defines its available inputs and outputs?

A.

inputs.yml

B.

config.json

C.

defaults.json

D.

workflow.yml

E.

action.yml

Page: 1 / 2
Total 72 questions
Copyright © 2014-2025 Solution2Pass. All Rights Reserved