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

Microsoft GH-200 - GitHub Actions Exam

Page: 3 / 5
Total 137 questions

As a developer, you created a JavaScript action. What is the best way to test your JavaScript action?

A.

Package your JavaScript action inside a Docker container image and run it.

B.

Create a workflow that only executes your specific JavaScript action.

C.

Create a workflow that includes the actions/debug-javascript action.

D.

Use a tool called @vercel/ncc to compile your code.

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

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.

As a developer, you need to make sure that only actions from trusted sources are available for use in your GitHub Enterprise Cloud organization. Which of the following statements are true? (Choose three.)

A.

Specific actions can individually be enabled for the organization, including version information.

B.

GitHub-verified actions can be collectively enabled for use in the enterprise.

C.

Actions can be restricted to only those available in the enterprise.

D.

Actions created by GitHub are automatically enabled and cannot be disabled.

E.

Individual third-party actions enabled with a specific tag will prevent updated versions of the action from introducing vulnerabilities.

F.

Actions can be published to an internal marketplace.

As a developer, how should you enable step debug logging for a workflow?

A.

Include the following code block in your workflow:

defaults:

ACTIONS_STEP_DEBUG: true

B.

Use the --actions-step-debug flag when calling the workflow.

C.

Set the ACTIONS_STEP_DEBUG secret or variable at the repository level to true.

D.

Include the following code block in your workflow:

env:

ACTIONS_STEP_DEBUG: true

What is a valid scenario regarding environment secrets?

A.

Ensuring a job cannot access environment secrets until approval is obtained from a required reviewer.

B.

Ensuring only a specific step can access an environment secret.

C.

Configuring environment secrets for connecting to GitHub Enterprise Server.

D.

Configuring environment secrets to automatically pull from Azure Key Vault.

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

A.

on:pull_request_label:branches:- ' releases ' paths:- ' apps/** '

B.

on:pull_request_review:types: [labeled]branches:- ' releases ' paths:- ' apps/** '

C.

on:pull_request:types: [labeled]branches:- ' releases/** ' paths:- ' apps '

D.

on:pull_request:types: [labeled]branches:- ' releases ' paths:- ' apps/** '

You are a DevOps engineer working on deployment workflows. You need to execute the deploy job only if the current branch name is feature-branch. Which code snippet will help you to implement the conditional execution of the job?

A.

jobs:deploy:if: github.ref_name == ' feature-branch ' runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3

B.

jobs:deploy:if: github.ref.name == ' feature-branch ' runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3

C.

jobs:deploy:if: github.branch_name == ' feature-branch ' runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3

D.

jobs:deploy:if: github.branch.name == ' feature-branch ' runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3

Which of the following is a valid reusable workflow reference?

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

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

Without the need to use additional infrastructure, what is the simplest and most maintainable method for configuring a workflow job to provide access to an empty PostgreSQL database?

A.

Use service containers with a Postgres database from Docker hub.

B.

Run the actions/postgres action in a parallel job.

C.

It is currently impossible to access the database with GitHub Actions.

D.

Dynamically provision and deprovision an environment.