Summer Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

GitHub Actions Exam

Last Update 4 hours ago Total Questions : 100

The GitHub Actions Exam content is now fully updated, with all current exam questions added 4 hours ago. Deciding to include GH-200 practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our GH-200 exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these GH-200 sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any GitHub Actions Exam practice test comfortably within the allotted time.

Question # 1

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

Question # 2

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?

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

Question # 3

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. < job_id > .env

F.

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

Question # 4

What are the two ways to pass data between jobs? (Choose two.)

A.

Use the copy action with restore parameter to restore the data from the cache

B.

Use the copy action to save the data that should be passed in the artifacts folder.

C.

Use the copy action with cache parameter to cache the data

D.

Use data storage.

E.

Use job outputs

F.

Use artifact storage.

Question # 5

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

Question # 6

As a DevOps engineer, you are developing workflows to build an application. You have a requirement to create the build targeting multiple node versions. Which code block should you use to define the workflow?

A.

jobs:

build-app:

strategy:

matrix:

node-ver: [10, 12, 14]

steps:

- uses: actions/setup-node@v3

with:

node-version: ${{ strategy.node-ver }}

B.

jobs:

build-app:

strategy:

matrix:

node-ver: [10, 12, 14]

steps:

- uses: actions/setup-node@v3

with:

node-version: ${{ matrix.node-ver }}

C.

jobs:

build-app:

matrix-strategy:

node-ver: [10, 12, 14]

steps:

- uses: actions/setup-node@v3

with:

node-version: ${{ matrix-strategy.node-ver }}

D.

jobs:

build-app:

matrix:

strategy:

node-ver: [10, 12, 14]

steps:

- uses: actions/setup-node@v3

with:

node-version: ${{ matrix.node-ver }}

Question # 7

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

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.

Question # 8

What are the two mandatory requirements for publishing GitHub Actions to the GitHub Marketplace? Each correct answer presents part of the solution.

NOTE: Each correct answer is worth one point.

A.

The action can be either in a public or private repository.

B.

The action’s name cannot match a user or organization on GitHub unless the user or organization owner is publishing the action.

C.

Each repository can contain a collection of actions as long as they are under the same Marketplace category.

D.

The action’s metadata file must be in the root directory of the repository.

E.

The name should match with one of the existing GitHub Marketplace categories.

Question # 9

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?

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

Question # 10

As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?

As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?

A.

core.info( ' Something went wrong, but it\ ' s not bad enough to fail the build. ' )

B.

core.notice( ' Something went wrong, but it\’s not bad enough to fail the build. ' )

C.

core.warning( ' Something went wrong, but it\ ' s not bad enough to fail the build. ' )

D.

core.warn( ' Something went wrong, but it\ ' s not bad enough to fail the build. ' )

Go to page: