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

Welcome To DumpsPedia

GH-200 Sample Questions Answers

Questions 4

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?

Options:

A.

Insights

B.

Code

C.

Actions

D.

Pull requests

E.

Issues

Buy Now
Questions 5

Without the need to use additional infrastructure, what is the simplest and most maintainable method for configuring a workflow job to provide access to an empty PostgreSQL database?

Options:

A.

Use service containers with a Postgres database from Docker hub.

B.

Run the actions/postgres action in a parallel job.

C.

It is currently impossible to access the database with GitHub Actions.

D.

Dynamically provision and deprovision an environment.

Buy Now
Questions 6

As a DevOps engineer, you need to execute a deployment to different environments like development and testing based on the labels added to a pull request. The deployment should use the releases branch and trigger only when there is a change in the files under apps folder. Which code block should be used to define the deployment workflow trigger?

Options:

A.

on:

pull_request_label:

branches:

- ' releases '

paths:

- ' apps/** '

B.

on:

pull_request_review:

types: [labeled]

branches:

- ' releases '

paths:

- ' apps/** '

C.

on:

pull_request:

types: [labeled]

branches:

- ' releases/** '

paths:

- ' apps '

D.

on:

pull_request:

types: [labeled]

branches:

- ' releases '

paths:

- ' apps/** '

Buy Now
Questions 7

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?

Options:

A.

Create repository secrets named DevCloud.DEPLOY_KEY and TestCloud.DEPLOY_KEY so that the reusable workflow parses the secrets by resource name.

B.

Store the different keys in a DEPLOY_KEY environment secret in the DevCloud and TestCloud environments. Specify DEPLOY_KEY in the secrets section of the reusable workflow.

C.

Use a marketplace action to conditionally parse the DEPLOY_KEY repository secret based on the cloud resource name.

D.

Populate a DEPLOY_KEY repository secret with a JSON object containing DevCloud and TestCloud properties. Then specify DEPLOY_KEY.DevCloud in the secrets sections of the reusable workflow.

Buy Now
Questions 8

As a developer, how can you identify a JavaScript action on GitHub?

Options:

A.

The action.yml metadata file references a package.json file.

B.

The action ' s repository includes a js.yml file in the .github/workflows directory.

C.

The action’s repository name includes the keyword “JavaScript.”

D.

The action.yml metadata file has the runs.using value set to node16.

Buy Now
Questions 9

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 10

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 11

As a developer, what is the safest way to reference an action to prevent modification of the underlying code?

Options:

A.

Use a commit hash.

B.

Use a branch name.

C.

Use a patch release tag.

D.

Use a major release tag.

Buy Now
Questions 12

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 13

As a developer, you need to make sure that only actions from trusted sources are available for use in your GitHub Enterprise Cloud organization. Which of the following statements are true? (Choose three.)

Options:

A.

Specific actions can individually be enabled for the organization, including version information.

B.

GitHub-verified actions can be collectively enabled for use in the enterprise.

C.

Actions can be restricted to only those available in the enterprise.

D.

Actions created by GitHub are automatically enabled and cannot be disabled.

E.

Individual third-party actions enabled with a specific tag will prevent updated versions of the action from introducing vulnerabilities.

F.

Actions can be published to an internal marketplace.

Buy Now
Questions 14

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

Options:

A.

Use caching when reusing files that change rarely between jobs or workflow runs.

B.

Use artifacts when referencing files produced by a job after a workflow has ended.

C.

Use caching to store cache entries for up to 30 days between accesses.

D.

Use artifacts to access the GitHub Package Registry and download a package for a workflow

Buy Now
Questions 15

What is the simplest action type to run a shell script?

Options:

A.

Docker container action

B.

Composite action

C.

Bash script action

D.

JavaScript action

Buy Now
Questions 16

When creating and managing custom actions in an enterprise setting, which of the following is considered a best practice?

Options:

A.

creating a separate repository for each action so that the version can be managed independently

B.

creating a separate branch in application repositories that only contains the actions

C.

creating a single repository for all custom actions so that the versions for each action are all the same

D.

including custom actions that other teams need to reference in the same repository as application code

Buy Now
Questions 17

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

Options:

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

Buy Now
Questions 18

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 19

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 20

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

Options:

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.

Buy Now
Questions 21

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 22

Which syntax correctly accesses a job output (output1) of an upstream job (job1) from a dependent job within a workflow?

Options:

A.

${{needs.job1.outputs.output1}}

B.

${{needs.job1.output1}}

C.

${{depends.job1.output1}}

D.

${{job1.outputs.output1}}

Buy Now
Questions 23

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

Options:

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: "

Buy Now
Questions 24

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

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 25

Your organization needs to simplify reusing and maintaining automation in your GitHub Enterprise Cloud. Which components can be directly reused across all repositories in an organization? (Choose three.)

Options:

A.

self-hosted runners

B.

actions stored m private repositories in the organization

C.

encrypted secrets

D.

custom Docker actions stored in GitHub Container Registry

E.

actions stored in an organizational partition in the GitHub Marketplace

F.

workflow templates

Buy Now
Questions 26

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 27

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

Options:

A.

with: python

B.

shell: bash

C.

working-directory: .github/python

D.

shell: python

Buy Now
Questions 28

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?

Options:

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 }}

Buy Now
Questions 29

As a developer, how can you identify a Docker container action on GitHub?

Options:

A.

The action ' s repository includes @actions/core in the root directory.

B.

The action ' s repository name includes the keyword " Docker. "

C.

The action.yml metadata file references a Dockerfile file.

D.

The action.yml metadata file has the runs.using value set to Docker.

Buy Now
Questions 30

What metadata file in a custom action defines the main entry point?

Options:

A.

action.js

B.

index.js

C.

action.yml

D.

main.yml

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

PDF + Testing Engine

$59.99 $171.4

Testing Engine

$44.99 $128.55

PDF (Q&A)

$49.99 $142.82