Black Friday Rush: 75% Off All Exam Bundles! Apply the coupon code below before the offer expires! - Ends in 0d 00h 00m 00s - Coupon code: newyear

Microsoft GH-200 - GitHub Actions Exam

Page: 3 / 5
Total 150 questions

You need to create new workflows to deploy to an unfamiliar cloud provider. What is the fastest and safest way to begin?

A.

Create a custom action to wrap the cloud provider ' s CLI.

B.

Search GitHub Marketplace for verified actions published by the cloud provider.

C.

Use the actions/jenkins-plugin action to utilize an existing Jenkins plugin for the cloud provider.

D.

Search GitHub Marketplace for actions created by GitHub.

E.

Download the CLI for the cloud provider and review the associated documentation.

You have a GitHub Enterprise Cloud Organization that contains private repositories for three apps. The workflow of each app has a job that uses repository secrets and calls a shared deployment action.

You plan to replace separate deployment scripts with a single custom action.

You need to recommend a distribution and versioning approach for the custom action. The solution must meet the following requirements:

    The action repository must be private.

    Only specific application repositories can use the action.

    The workflow reference must be resistant to changes in the action repository without requiring a workflow file change.

What should you recommend?

A.

Store the custom action in a public repository.

Publish the action to GitHub Marketplace.

Reference the action by using a full-length commit SHA.

B.

Store the custom action in a private repository.

Enable all the repositories in the organization to access the action.

Reference the action by using a full-length commit SHA.

C.

Store the custom action in a private repository.

Enable only selected repositories in the organization to access the action.

Reference the action by using a full-length commit SHA.

D.

Store the custom action in a private repository.

Enable only selected repositories in the organization to access the action.

Reference the action by using a semantic version tag.

As a developer, you want to run a workflow from the Actions tab in GitHub. Which YAML snippet should you use to match the interface in this image?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

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

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.

A.

Scheduled workflows run on the:

B.

latest commit and branch on which the workflow was triggered,

C.

latest commit from the branch named schedule,

D.

latest commit from the branch named main,

E.

specified commit and branch from the workflow YAML file,

F.

latest commit on the default or base branch

What is the proper syntax to reference the system-provided run number variable?

A.

$GITHUB_RUN_NUMBER

B.

${{ env.GITHUB_RUN_NUMBER }}

C.

${{ var.GITHUB_RUN_NUMBER }}

D.

$github.run_number

E.

${{ GITHUB_RUN_NUMBER }}

Which command can you include in your workflow file to set the output parameter for an action?

A.

echo " action_color=purple " > > $GITHUB_OUTPUT

B.

echo " action_color=purple " > > $GITHUB_ENV

C.

echo " ::add-mask::$ACTION_COLOR "

D.

echo " ::debug::action_color=purple "

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 loggingE composite run step

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.

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