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

Microsoft GH-200 GitHub Actions Exam Exam Practice Test

Page: 1 / 7
Total 72 questions

GitHub Actions Exam Questions and Answers

Question 1

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

Question 2

Which action type should be used to bundle a series of run steps into a reusable custom action?

Options:

A.

Composite action

B.

Bash script action

C.

Docker container action

D.

JavaScript action

Question 3

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.

Question 4

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"

Question 5

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

Options:

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.

Question 6

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

Question # 6

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.

Question 7

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?

Options:

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

Question 8

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

Question 9

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

Question 10

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.

Question 11

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

Question 12

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.

Option A12

B.

Option B12

C.

Option C12

D.

Option D12

Question 13

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.

Question 14

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

Question 15

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

A)

Question # 15

B)

Question # 15

C)

Question # 15

D)

Question # 15

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 16

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.

Question 17

What are the advantages of using a matrix strategy in a job definition? (Choose two.)

Options:

A.

It can test code in multiple versions of a programming language.

B.

It can decrease the costs for running multiple combinations of programming language/operating systems.

C.

It can run up to 512 jobs per workflow run.

D.

It can test code in multiple operating systems.

Question 18

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

Question 19

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.

Question 20

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.

Question 21

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

Page: 1 / 7
Total 72 questions