Weekend Sale Special - 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: newyear

Microsoft GH-200 - GitHub Actions Exam

Page: 2 / 5
Total 137 questions

Which workflow event is used to manually trigger a workflow run?

A.

create

B.

workflow_dispatch

C.

workflow_run

D.

status

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.

As a developer, you are configuring GitHub Actions to deploy VMs to production. A member of the VMOps team must provide approval before the deployment occurs. Which of the following steps should you take?

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

A.

Specify the environment named Production in the workflow jobs that deploy to the VMs.

B.

Navigate to the organization settings and create a Production environment with the VMOps team as a required reviewer.

C.

Navigate to the repository settings and create a Production environment with the VMOps team as a required reviewer.

D.

Specify the VMOps team as the owner of the environment.

E.

Add the VMs to the environment.

You need to use a specific version of an action. How should you use v1 of an actions/javascript-action repository in your workflow?

A.

steps:uses: actions/javascript-action/v1

B.

steps:uses: actions/javascript-actionversion: v1

C.

steps:uses: actions/javascript-action-v1

D.

steps:uses: actions/javascript-action@v1

In which locations can actions be referenced by workflows? (Choose three.)

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

You are a DevOps engineer in ABC Corp. You need to schedule your deployment workflow twice a week at 7:45 UTC every Wednesday and Saturday. What is the appropriate YAML structure?

A.

on:

schedule:

- cron: ' 45 7 * * 3,6 '

B.

on:

cron:

- schedule: ' 45 7 * * 3,6 '

C.

on:

schedule: ' 45 7 * * 3,6 '

D.

on:

cron: ' 45 7 * * 3,6 '

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

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.

What is the right method to ensure users approve a workflow before the next step proceeds?

A.

creating a branch protection rule and only allow certain users access

B.

granting users workflow approval permissions

C.

adding users as required reviewers for an environment

D.

granting users repository approval permissions

You need to perform a task that requires running a custom script in a GitHub Actions workflow. The script must run within the workflow environment without requiring an external container or prebuilt image.

What should you use?

A.

a JavaScript action

B.

a Docker container action

C.

a run step

D.

a composite action

As a developer, what is the safest way to reference an action to prevent modification of the underlying code?

A.

Use a commit hash.

B.

Use a branch name.

C.

Use a patch release tag.

D.

Use a major release tag.