Halloween Sale Special 75% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 75brite

ExamsBrite Dumps

GitHub Actions Exam Question and Answers

GitHub Actions Exam

Last Update Oct 24, 2026
Total Questions : 137

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

$28.75  $114.99
GH-200 Engine

GH-200 Testing Engine

$33.75  $134.99
GH-200 PDF + Engine

GH-200 PDF + Testing Engine

$43.75  $174.99
Questions 1

Which choices represent best practices for publishing actions so that they can be consumed reliably?

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

Options:

A.  

Organization name

B.  

Commit SHA

C.  

Repository name

D.  

Tag

E.  

Default branch

Discussion 0
Questions 2

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

Options:

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.

Discussion 0
Questions 3

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.

Discussion 0
Questions 4

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 5

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 6

As a developer, you need to leverage Redis in your workflow. What is the best way to use Redis on a self-hosted Linux runner without affecting future workflow runs?

Options:

A.  

Add a run step to your workflow, which dynamically installs and configures Redis as part of your job.

B.  

Specify container: and services: in your job definition to leverage a Redis service container.

C.  

Set up Redis on a separate machine and reference that instance from your job.

D.  

Install Redis on the hosted runner image and place it in a runner group. Specify label: in your job to target the runner group.

Discussion 0
Questions 7

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.

Discussion 0
Questions 8

As a developer, you need to use GitHub Actions to deploy a microservice that requires runtime access to a secure token. This token is used by a variety of other microservices managed by different teams in different repos. To minimize management overhead and ensure the token is secure, which mechanisms should you use to store and access the token? (Choose two.)

Options:

A.  

Store the token in a configuration file in a private repository. Use GitHub Actions to deploy the configuration file to the runtime environment.

B.  

Store the token as a GitHub encrypted secret in the same repo as the code. Create a reusable custom GitHub Action to access the token by the microservice at runtime.

C.  

Use a corporate non-GitHub secret store (e.g., HashiCorp Vault) to store the token. During deployment, use GitHub Actions to store the secret in an environment variable that can be accessed at runtime.

D.  

Store the token as a GitHub encrypted secret in the same repo as the code. During deployment, use GitHub Actions to store the secret in an environment variable that can be accessed at runtime.

E.  

Store the token as an organizational-level encrypted secret in GitHub. During deployment, use GitHub Actions to store the secret in an environment variable that can be accessed at runtime.

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

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

Discussion 0
Questions 11

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 12

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.

Discussion 0
Questions 13

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 14

What are the most significant advantages of adding documentation while distributing custom actions?

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

Options:

A.  

It shares the description of the action with users.

B.  

It creates a README.md for the consuming workflow.

C.  

It provides an example of the action.

D.  

It generates autocomplete when using the action in a workflow.

Discussion 0
Questions 15

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

Discussion 0
Questions 16

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.

Discussion 0
Questions 17

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 18

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 19

As a developer, one of your workflows requires Xcode version 11.2 hosted on macOS Catalina (version 10.15). You have already created and configured a self-hosted runner to conform to those requirements and registered it with your organization. What else should you do to ensure that the workflow accesses the correct runner instance?

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

Options:

A.  

Create runner groups named macos-10.15 and xcode-11.2.

B.  

In the workflow, specify:

runs-on: [${{ groups.macos-10.15 }}, ${{ groups.xcode-11.2 }}]

C.  

Assign the custom labels to the self-hosted runner.

D.  

Create custom runner labels for macos-10.15 and xcode-11.2.

E.  

Add your runner to the appropriate runner groups.

F.  

In the workflow, specify:

runs-on: [self-hosted, macos-10.15, xcode-11.2]

Discussion 0
Questions 20

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.

Discussion 0
Questions 21

As a DevOps engineer, you are developing a composite action. You have a step that needs to be executed against a subdirectory. Which code snippet should you use within the composite action to specify the directory?

Options:

A.  

runs:using: " composite " steps:- run: $GITHUB_ACTION_PATH/script.shdirectory: ${{ inputs.dir }}shell: bash

B.  

runs:using: " composite " directory: ${{ inputs.dir }}steps:- run: $GITHUB_ACTION_PATH/script.shshell: bash

C.  

runs:using: " composite " working-directory: ${{ inputs.dir }}steps:- run: $GITHUB_ACTION_PATH/script.shshell: bash

D.  

runs:using: " composite " steps:- run: $GITHUB_ACTION_PATH/script.shworking-directory: ${{ inputs.dir }}shell: bash

Discussion 0
Questions 22

A workflow that had been working now stalls in a waiting state until failing. The workflow file process_ml.yaml has not changed and contains jobs specifying runs-on: [gpu]. Which of the following steps would troubleshoot the issue?

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

Options:

A.  

Review the contents of the Runner_*.log files in the _diag folder.

B.  

Rotate the GITHUB_TOKEN secret for the appropriate runners.

C.  

Check the Set up job step in the logs of the last successful run to determine the runner.

D.  

Update the organization settings to enable GPU-based GitHub-hosted runners.

E.  

Increase the usage limits for GitHub-hosted runners.

Discussion 0
Questions 23

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

Discussion 0
Questions 24

As a DevOps engineer, you need to define a deployment workflow that runs after the build workflow has successfully completed. Without modifying the build workflow, which trigger should you define in the deployment workflow?

Options:

A.  

repository_dispatch

B.  

workflow_run

C.  

workflow_exec

D.  

workflow_dispatch

Discussion 0
Questions 25

Which of the following is a valid reusable workflow reference?

Options:

A.  

uses: another-repo/workflow.yml@v1

B.  

uses: octo-org/another-repo/.github/workflows/workflow.yml@v1

C.  

uses: octo-org/another-repo/workflow.yml@v1

D.  

uses: another-repo/.github/workflows/workflow.yml@v1

Discussion 0
Questions 26

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

Discussion 0
Questions 27

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 28

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 29

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

Discussion 0
Questions 31

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

Options:

A.  

inputs.yml

B.  

config.json

C.  

defaults.json

D.  

workflow.yml

E.  

action.yml

Discussion 0
Questions 32

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

Options:

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

Discussion 0
Questions 33

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 34

Which of the following is the proper syntax to specify a custom environment variable named MY_VARIABLE with the value my-value?

Options:

A.  

env:

MY_VARIABLE = my-value

B.  

environment:

MY_VARIABLE = my-value

C.  

env:

MY_VARIABLE: my-value

D.  

var:

MY_VARIABLE: my-value

E.  

var:

MY_VARIABLE = my-value

F.  

environment:

MY_VARIABLE: my-value

Discussion 0
Questions 35

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 36

Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?

Options:

A.  

ENV_ACTOR

B.  

GITHUB_WORKFLOW_ACTOR

C.  

GITHUB_ACTOR

D.  

GITHUB_USER

Discussion 0
Questions 37

As a developer, you are using a Docker container action in your workflow. What is required for the action to run successfully?

Options:

A.  

The job env must be set to a Linux environment.

B.  

The job runs-on must specify a Linux machine with Docker installed.

C.  

The referenced action must be hosted on Docker Hub.

D.  

The action must be published to the GitHub Marketplace.

Discussion 0
Questions 38

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 39

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

As a developer, you created a JavaScript action. What is the best way to test your JavaScript action?

Options:

A.  

Package your JavaScript action inside a Docker container image and run it.

B.  

Create a workflow that only executes your specific JavaScript action.

C.  

Create a workflow that includes the actions/debug-javascript action.

D.  

Use a tool called @vercel/ncc to compile your code.

Discussion 0
Questions 41

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

Discussion 0