Month End Sale Special - 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save75geek

GH-200 GitHub Actions Exam Questions and Answers

Questions 4

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 5

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
Questions 6

You need to create a reusable GitHub Actions workflow template named ci.yml. The solution must ensure that ci.yml appears on the New workflow interface of GitHub Actions. Where should you store ci.yml?

Options:

A.

.github/workflows

B.

.github/templates

C.

.github/workflow-templates

D.

the root directory of each repository

Buy Now
Questions 7

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.

Options:

A.

It creates a readme.md for the consuming workflow.

B.

It shares the description of the action to the users.

C.

It provides an example of the action.

D.

It generates auto completion when using the action in a workflow.

Buy Now
Questions 8

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 9

Which default GitHub environment variable indicates the owner and repository name?

Options:

A.

REPOSITORY NAME

B.

GITHUB REPOSITORY

C.

ENV REPOSITORY

D.

GITHUB WORKFLOW REPO

Buy Now
Questions 10

Which native method should you use to pass files between jobs within the same GitHub Actions workflow?

Options:

A.

Use artifact storage.

B.

Use job outputs.

C.

Use the copy action with the cache parameter to cache the data.

D.

Use an external blob store

Buy Now
Questions 11

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

Options:

A.

GITHUB_TAG

B.

GITHUB_REF

C.

ENV_BRANCH

D.

GITHUB_BRANCH

Buy Now
Questions 12

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 13

As a developer, which workflow steps should you perform to publish an image to the GitHub Container Registry? (Choose three.)

Options:

A.

Use the actions/setup-docker action

B.

Authenticate to the GitHub Container Registry.

C.

Build the container image.

D.

Push the image to the GitHub Container Registry

E.

Pull the image from the GitHub Container Registry.

Buy Now
Questions 14

In which scenarios could the GITHUB_TOKEN be used? (Choose two.)

Options:

A.

to leverage a self-hosted runner

B.

to create a repository secret

C.

to publish to GitHub Packages

D.

to create issues in the repo

E.

to read from the file system on the runner

F.

to add a member to an organization

Buy Now
Questions 15

What is the smallest scope for an environment variable?

Options:

A.

the workflow settings

B.

a step

C.

a job

D.

the workflow env mapping

Buy Now
Questions 16

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

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 17

What can be used to set a failed status of an action from its code?

Options:

A.

@actions/github toolkit

B.

JavaScript dist/ folder

C.

Dockerfile CMD

D.

a non-zero exit code

E.

output variable

F.

composite run step

Buy Now
Questions 18

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 19

As a developer, your self-hosted runner sometimes loses its connection while running jobs. How should you troubleshoot the issue affecting your self-hosted runner?

Options:

A.

Access the self-hosted runner ' s installation directory and look for log files in the _diag folder.

B.

Locate the self-hosted runner in your repository ' s settings page and download its log archive.

C.

Start the self-hosted runner with the --debug flag to produce more verbose console output.

D.

Set the DEBUG environment variable to true before starting the self-hosted runner.

Buy Now
Questions 20

Your organization has a secret that must be available to all the repositories within GitHub Actions workflows.

You need to store the secret. The solution must minimize administrative effort.

What should you do in GitHub?

Options:

A.

For each GitHub repository, select Settings > Secrets and variables > Actions, and then add the secret.

B.

From your personal GitHub profile, select Settings > Developer settings > Secrets, and then add the secret.

C.

From the organization ' s page, select Settings > Security > Secrets, and then add the secret.

D.

From the organization ' s page, select Settings > Secrets and variables > Actions, and then add the secret.

Buy Now
Questions 21

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?

Options:

A.

GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs

B.

POST /repos/{owner}/{repo}/actions/runs/{run_id}/logs

C.

GET /repos/{owner}/{repo}/actions/artifacts/logs

D.

POST /repos/{owner}/{repo}/actions/runs/{run_id}

Buy Now
Questions 22

What is a valid scenario regarding environment secrets?

Options:

A.

Ensuring a job cannot access environment secrets until approval is obtained from a required reviewer.

B.

Ensuring only a specific step can access an environment secret.

C.

Configuring environment secrets for connecting to GitHub Enterprise Server.

D.

Configuring environment secrets to automatically pull from Azure Key Vault.

Buy Now
Questions 23

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 24

A development team has been using a Powershell script to compile and package their solution using existing tools on a Linux VM, which has been configured as a self-hosted runner. They would like to use the script as-is in an automated workflow. Which of the following should they do to invoke their script within a workflow step?

Options:

A.

Configure a self-hosted runner on Windows with the requested tools.

B.

Use the YAML powershell: step.

C.

Run the pwsh2bash command to convert the script so it can be run on Linux.

D.

Use the YAML shell: pwsh in a run step.

E.

Use the actions/run-powershell action to invoke the script.

Buy Now
Questions 25

An organization ' s policies specify that only local actions are allowed. How should actions be distributed for this organization?

Options:

A.

Via the GitHub Marketplace

B.

Via the .github repository owned by the organization

C.

Via a repository owned by a third party

D.

Via repositories owned by the organization

Buy Now
Questions 26

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?

Options:

A.

on:

schedule:

- cron: ' 45 7 * * 3,6 '

B.

on:

cron:

- schedule: ' 45 7 * * 3,6 '

C.

on:

schedule: ' 45 7 * * 3,6 '

D.

on:

cron: ' 45 7 * * 3,6 '

Buy Now
Questions 27

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 28

What is a role of GitHub Marketplace when using GitHub Actions?

Options:

A.

GitHub Marketplace restricts the use of third-party actions to only public repositories.

B.

GitHub Marketplace serves only as a billing dashboard for tracking paid actions.

C.

GitHub Marketplace provides a centralized location to discover, share, and publish reusable GitHub Actions workflows created by the community or vendors.

D.

GitHub Marketplace allows a user to deploy GitHub Actions workflows to any repository automatically without requiring permissions.

Buy Now
Questions 29

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

}

Options:

A.

core.setException(error.message);

B.

core.action.setException(error.message);

C.

core.setFailed(error.message);

D.

action.setError(error.message);

Buy Now
Questions 30

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

Options:

A.

The action’s repository includes Dockerfile and package.json files.

B.

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

C.

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

D.

The action’s repository includes an init.sh file in the root directory.

Buy Now
Questions 31

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 32

Which of the following statements are true regarding the use of GitHub Actions on a GitHub Enterprise Server instance? (Choose three.)

Options:

A.

Use of GitHub Actions on GitHub Enterprise Server requires a persistent internet connection

B.

Actions created by GitHub are automatically available and cannot be disabled

C.

Most GitHub authored actions are automatically bundled for use on GitHub Enterprise Server

D.

Third party actions can be used on GitHub Enterprise Server by configuring GitHub Connect

E.

Actions must be defined in the .github repository

F.

Third party actions can be manually synchronized for use on GitHub Enterprise Server

Buy Now
Questions 33

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 34

As a developer, you are configuring GitHub Actions to deploy VMs to production. A member of the VMOps team must provide approval before the deployment occurs. Which of the following steps should you take?

(Each correct answer presents part of the solution. Choose two.)

Options:

A.

Specify the environment named Production in the workflow jobs that deploy to the VMs.

B.

Navigate to the organization settings and create a Production environment with the VMOps team as a required reviewer.

C.

Navigate to the repository settings and create a Production environment with the VMOps team as a required reviewer.

D.

Specify the VMOps team as the owner of the environment.

E.

Add the VMs to the environment.

Buy Now
Questions 35

Which of the following is the most common way to target a specific major release version?

Options:

A.

steps:uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

B.

steps:uses: actions/checkout@U1673995124

C.

steps:uses: actions/checkout@v3

D.

steps:uses: actions/checkout

Buy Now
Questions 36

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

Options:

A.

Dockerfile

B.

Actionfile

C.

metadata.yml

D.

action.yml

Buy Now
Questions 37

A single secret must be accessed by workflows in specific repositories. What is the best way to create the secret?

Options:

A.

Create an organization secret, specify Selected repositories as the repository access, and select the required repositories.

B.

Create an environment secret at the organization level and leverage that environment in each of the specified repositories.

C.

Store the secret in a supported external key vault. Configure OpenID Connect (OIDC) to allow access to the external vault and link the secret from the external key vault in each of the specific repositories.

D.

Create the secret in one of the repositories, check the Share secret option, and select the required repositories.

Buy Now
Questions 38

What are two reasons to keep an action in its own repository instead of bundling it with other application code?

(Each correct answer presents a complete solution. Choose two.)

Options:

A.

It makes it easier for the GitHub community to discover the action.

B.

It decouples the action ' s versioning from the versioning of other application code.

C.

It allows sharing workflow secrets with other users.

D.

It widens the scope of the code base for developers fixing issues and extending the action.

E.

It makes the action.yml file optional.

Buy Now
Questions 39

You need to make a script to retrieve workflow run logs via the API. Which is the correct API to download a workflow run log?

Options:

A.

POST /repos/:owner/:repo/actions/runs/:run_id

B.

GET /repos/:owner/:repo/actions/artifacts/logs

C.

GET /repos/:owner/:repo/actions/runs/:run_id/logs

D.

POST /repos/:owner/:repo/actions/runs/:run_id/logs

Buy Now
Questions 40

You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?

Options:

A.

check_suite

B.

workflow_run

C.

deployment

D.

repository_dispatch

Buy Now
Questions 41

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-lateststeps:- uses: actions/checkout@v3

B.

jobs:deploy:if: github.ref.name == ' feature-branch ' runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3

C.

jobs:deploy:if: github.branch_name == ' feature-branch ' runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3

D.

jobs:deploy:if: github.branch.name == ' feature-branch ' runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3

Buy Now
Exam Code: GH-200
Exam Name: GitHub Actions Exam
Last Update: Sep 30, 2026
Questions: 137
GH-200 pdf

GH-200 PDF

$23.75  $94.99
GH-200 Engine

GH-200 Testing Engine

$27.5  $109.99
GH-200 PDF + Engine

GH-200 PDF + Testing Engine

$36.25  $144.99