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

Home > Microsoft > GitHub Administrator > GH-200

GH-200 GitHub Actions Exam Question and Answers

Question # 4

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

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"

Full Access
Question # 5

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?

A.

check_run

B.

workflow_run

C.

workflow_call

D.

pull_request

Full Access
Question # 6

As a developer, you have a 10-MB data set that is required in a specific workflow. Which steps should you perform so the dataset is stored encrypted and can be decrypted during the workflow? (Choose three.)

A.

Encrypt the dataset.

B.

Leverage the actions/download-secret action in the workflow.

C.

Store the dataset in a GitHub encrypted secret.

D.

Store the encryption keys in a GitHub encrypted secret.

E.

Compress the dataset

F.

Commit the encrypted dataset to the same repository as the workflow

G.

Create a GitHub encrypted secret with the Large object option selected and upload the dataset.

Full Access
Question # 7

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

A.

ENV_ACTOR

B.

GITHUB_WORKFLOW_ACTOR

C.

GITHUB_ACTOR

D.

GITHUB_USER

Full Access
Question # 8

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

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.

Full Access
Question # 9

As a developer, you are designing a workflow and need to communicate with the runner machine to set environment variables, output values used by other actions, add debug messages to the output logs, and other tasks. Which of the following options should you use?

A.

environment variables

B.

workflow commands

C.

self-hosted runners

D.

enable debug logging

E composite run step

Full Access
Question # 10

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?

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

Full Access
Question # 11

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

Full Access
Question # 12

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

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.

Full Access
Question # 13

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

A.

Set the DEBUG environment variable to true before starting the self-hosted runner to produce more verbose console output.

B.

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

C.

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

D.

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

Full Access
Question # 14

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.

Full Access
Question # 15

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

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.

Full Access
Question # 16

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?

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

Full Access
Question # 17

GitHub-hosted runners support which capabilities? (Choose two.)

A.

automatic patching of both the runner and the underlying OS

B.

automatic file-system caching between workflow runs

C.

support for Linux, Windows, and mac

D.

support for a variety of Linux variations including CentOS, Fedora, and Debian

E.

requiring a payment mechanism (e.g., credit card) to use for private repositories

Full Access
Question # 18

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

Full Access
Question # 19

Which of the following scenarios requires a developer to explicitly use the GITHUB_TOKEN or github.token secret within a workflow? (Choose two.)

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

Full Access
Question # 20

Which choices represent best practices for publishing actions so that they can be consumed reliably? (Choose two.)

A.

repo name

B.

tag

C.

commit SHA

D.

organization name

E.

default branch

Full Access
Question # 21

What is the smallest scope for an environment variable?

A.

the workflow settings

B.

a step

C.

a job

D.

the workflow env mapping

Full Access