Pre-Winter Sale Limited Time 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = simple75

Pass the Microsoft GitHub Administrator GH-200 Questions and answers with Dumpstech

Exam GH-200 Premium Access

View all detail and faqs for the GH-200 exam

Practice at least 50% of the questions to maximize your chances of passing.
Viewing page 5 out of 5 pages
Viewing questions 41-50 out of questions
Questions # 41:

You need to make a script to retrieve workflow run logs by using the API. Which is the correct API endpoint to download a workflow run log?

Options:

A.

GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs

B.

POST /repos/{owner}/{repo}/actions/runs/{run_id}/logs

C.

GET /repos/{owner}/{repo}/actions/artifacts/logs

D.

POST /repos/{owner}/{repo}/actions/runs/{run_id}

Questions # 42:

While awaiting approval, how many days can a workflow be in the “Waiting” state before it automatically fails?

Options:

A.

7 days

B.

14 days

C.

30 days

D.

60 days

Questions # 43:

As a DevOps engineer, you need to execute a deployment to different environments such as development and testing based on labels added to a pull request. The deployment should use the releases branch and trigger only when there is a change in files under the apps folder. Which code block should be used to define the deployment workflow trigger?

Options:

A.

on:

pull_request_review:

types: [labeled]

branches:

- ' releases '

paths:

- ' apps/** '

B.

on:

pull_request:

types: [labeled]

branches:

- ' releases/** '

paths:

- ' apps '

C.

on:

pull_request:

types: [labeled]

branches:

- ' releases '

paths:

- ' apps/** '

D.

on:

pull_request_label:

branches:

- ' releases '

paths:

- ' apps/** '

Questions # 44:

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.

Questions # 45:

Which workflows can use an action stored in an internal repository when repository access is enabled for the organization or enterprise?

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

Options:

A.

Workflows in internal repositories owned by the same organization or enterprise.

B.

Workflows in private repositories owned by an organization in the enterprise.

C.

Workflows in selected public repositories outside the enterprise.

D.

Workflows in public repositories owned by the same organization as the enterprise.

Questions # 46:

You are a DevOps engineer working on custom Actions development. You need to handle errors or exceptions as part of the JavaScript-based action code. What should be added to the following code block to handle errors?

const core = require( ' @actions/core ' );

try {

// action code

} catch (error) {

// insert snippet here

}

Options:

A.

core.setException(error.message);

B.

core.action.setException(error.message);

C.

core.setFailed(error.message);

D.

action.setError(error.message);

Questions # 47:

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

Questions # 48:

You are a DevOps engineer working on a custom action. You want to conditionally run a script at the start of the action, before the main entry point. Which code block should be used to define the metadata file for your custom action?

Options:

A.

runs:

using: ' node16 '

start: ' start.js '

start-if: github.event_name == ' push '

main: ' index.js '

B.

runs:

using: ' node16 '

pre: ' start.js '

pre-if: github.event_name == ' push '

main: ' index.js '

C.

runs:

using: ' node16 '

pre-if: github.event_name == ' push ' then ' start.js '

main: ' index.js '

D.

runs:

using: ' node16 '

before: ' start.js '

before-if: github.event_name == ' push '

main: ' index.js '

Questions # 49:

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.

Questions # 50:

What is the most secure way to store sensitive information in GitHub Actions workflows?

Options:

A.

Use environment variables in the workflow and store sensitive data directly in the variables.

B.

From the GitHub repository settings, store sensitive data as unencrypted text.

C.

Store the sensitive information as plain text in the workflow YAML file.

D.

Use GitHub Enterprise Managed User (OIDC) integration to dynamically fetch secrets from a third-party secrets manager.

Viewing page 5 out of 5 pages
Viewing questions 41-50 out of questions