Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

Microsoft GH-200 GitHub Actions Exam Exam Practice Test

Demo: 21 questions
Total 72 questions

GitHub Actions Exam Questions and Answers

Question 1

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?

Options:

A.

environment variables

B.

workflow commands

C.

self-hosted runners

D.

enable debug logging

E composite run step

Question 2

How many jobs will result from the following matrix configuration?

Options:

A.

3 jobs

B.

4 jobs

C.

5 jobs

D.

6 jobs

Question 3

As a developer, you need to create a custom action written in Python. Which action type should you choose?

As a developer, you need to create a custom action written in Python. Which action type should you choose?

Options:

A.

JavaScript action

B.

composite run step

C.

Python action

D.

Docker container action

Question 4

Which syntax correctly accesses a job output (output1) of an upstream job (job1) from a dependent job within a workflow?

Options:

A.

${{needs.job1.outputs.output1}}

B.

${{needs.job1.output1}}

C.

${{depends.job1.output1}}

D.

${{job1.outputs.output1}}

Question 5

When reviewing an action for use, what file defines its available inputs and outputs?

Options:

A.

inputs.yml

B.

config.json

C.

defaults.json

D.

workflow.yml

E.

action.yml

Question 6

How should you install the bats NPM package in your workflow?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 7

As a developer, what options should you recommend to implement standards for automation reuse? (Choose two.)

Options:

A.

Create workflow templates and store them in the organization's .github repository.

B.

Create reusable actions and workflows that can be called from other workflows.

C.

Create a marketplace partition to publish reusable automation for the company.

D.

Store shared corporate actions in subfolders in a defined and documented internally accessible repository.

Question 8

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.

B.

C.

D.

Question 9

Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?

Options:

A.

ENV_ACTOR

B.

GITHUB_WORKFLOW_ACTOR

C.

GITHUB_ACTOR

D.

GITHUB_USER

Question 10

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

Options:

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.

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

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 13

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

Options:

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

Question 14

As a developer, your self-hosted runner sometimes looses connection while running jobs. How should you troubleshoot the issue affecting your self-hosted runner?

Options:

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.

Question 15

Which files are required for a Docker container action in addition to the source code? (Choose two.)

Options:

A.

Dockerfile

B.

Actionfile

C.

metadata.yml

D.

action.yml

Question 16

You have exactly one Windows x64 self-hosted runner, and it is configured with custom tools. Which syntax could you use in the workflow to target that runner?

Options:

A.

self-hosted: [windows-x64]

B.

runs-on: [self-hosted, windows, x64]

C.

runs-on: windows-latest

D.

self-hosted: [windows, x64]

Question 17

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?

Options:

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.

Question 18

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 19

Which choices represent best practices for publishing actions so that they can be consumed reliably? (Choose two.)

Options:

A.

repo name

B.

tag

C.

commit SHA

D.

organization name

E.

default branch

Question 20

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

Options:

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.

Question 21

What can be used to set a failed status of an action from its code?

Options:

A.

@actions/github toolkit

B.

JavaScript dist/ folder

C.

Dockerfile CMD

D.

a non-zero exit code

E.

output variable

F.

composite run step

Demo: 21 questions
Total 72 questions