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

ExamsBrite Dumps

GitHub Actions Exam Question and Answers

GitHub Actions Exam

Last Update Jul 25, 2026
Total Questions : 100

We are offering FREE GH-200 Microsoft exam questions. All you do is to just go and sign up. Give your details, prepare GH-200 free exam questions and then go for complete pool of GitHub Actions Exam test questions that will help you more.

GH-200 pdf

GH-200 PDF

$40.25  $114.99
GH-200 Engine

GH-200 Testing Engine

$47.25  $134.99
GH-200 PDF + Engine

GH-200 PDF + Testing Engine

$61.25  $174.99
Questions 1

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.

Discussion 0
Questions 2

What are the two types of environment protection rules you can configure? (Choose two.)

Options:

A.  

required reviewers

B.  

branch protections

C.  

wait timer

D.  

artifact storage

Discussion 0
Questions 3

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

Discussion 0
Questions 4

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.

Discussion 0
Questions 5

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

Discussion 0
Questions 6

You are a developer, and your container jobs are failing on a self-hosted runner. Which requirements must you check to ensure that the self-hosted runner is properly configured? (Choose two.)

Options:

A.  

The self-hosted runner is running a Linux operating system.

B.  

The self-hosted runner is running a Windows operating system.

C.  

Docker is installed on the self-hosted runner.

D.  

Kubernetes is installed on the self-hosted runner.

E.  

The service status of Kubernetes is " active " .

Discussion 0
Questions 7

Which statement is true about using default environment variables?

Options:

A.  

The environment variables can be read in workflows using the ENV: variable_name syntax.

B.  

The environment variables created should be prefixed with GITHUB_ to ensure they can be accessed in workflows

C.  

The environment variables can be set in the defaults: sections of the workflow

D.  

The GITHUB_WORKSPACE environment variable should be used to access files from within the runner.

Discussion 0
Questions 8

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

Discussion 0
Questions 9

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.

Options:

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.

Discussion 0
Questions 10

As a developer, you need to add the correct syntax to allow the following workflow file to be triggered by multiple types of events.

Which two code blocks should you add starting at line 5? Each correct answer presents a complete solution.

NOTE: Each correct answer is worth one point.

4 name: Node CI/CD

5

6

7

8 jobs:

9 build:

10 runs-on:

11 steps:

12 - uses: actions/checkout@v2

13 - uses: actions/setup-node@v1

14 with:

15 node-version: 12

16 - run: npm ci

17 - run: npm test

18

Options:

A.  

on:

env:

- ' prod '

- ' qa '

- ' test '

B.  

on: [push, commit]

C.  

on: [push, pull_request]

D.  

on:

branches:

- ' main '

- ' dev '

E.  

on:

push:

branches:

- main

release:

types:

- created

F.  

on:

schedule:

- cron: ' */15 * * * * '

initiate:

- ' main '

Discussion 0
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.

Discussion 0
Questions 12

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

Discussion 0
Questions 13

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.

Discussion 0
Questions 14

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.

Discussion 0
Questions 15

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/** '

Discussion 0
Questions 16

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?

Options:

A.  

via the .github repository owned by the organization

B.  

via repositories owned by the organization

C.  

via the GitHub Marketplace

D.  

via a repository owned by a third party

Discussion 0
Questions 17

You installed specific software on a Linux self-hosted runner. You have users with workflows that need to be able to select the runner based on the identified custom software. Which steps should you perform to prepare the runner and your users to run these workflows? (Choose two.)

Options:

A.  

Create the group custom-software-on-linux and move the runner into the group.

B.  

Inform users to identify the runner based on the group.

C.  

Add the label custom-software to the runner.

D.  

Configure the webhook and network to enable GitHub to trigger workflow.

E.  

Add the label linux to the runner.

Discussion 0
Questions 18

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

Discussion 0
Questions 19

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

Discussion 0
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.

Discussion 0
Questions 21

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

Discussion 0
Questions 22

You have exactly one Windows x64 self-hosted runner, and it is configured with custom tools. Which syntax could you use in the workflow to target that runner?

Options:

A.  

self-hosted: [windows-x64]

B.  

runs-on: [self-hosted, windows, x64]

C.  

runs-on: windows-latest

D.  

self-hosted: [windows, x64]

Discussion 0
Questions 23

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

Discussion 0
Questions 24

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

Discussion 0
Questions 25

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

Discussion 0
Questions 26

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?

Options:

A.  

B.  

C.  

D.  

Discussion 0
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

Discussion 0
Questions 28

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

Discussion 0
Questions 29

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?

Options:

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

Discussion 0
Questions 30

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

Options:

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 "

Discussion 0