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

Free and Premium Microsoft GH-200 Dumps Questions Answers

Page: 1 / 5
Total 72 questions

GitHub Actions Exam Questions and Answers

Question 1

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.

Buy Now
Question 2

Which run: command will set a step's output?

Options:

A.

run: echo "MY_OUTPUT=foo" >> $GITHUB_OUTPUT

B.

run: export MY_OUTPUT=foo

C.

run: echo ${{ $GITHUB_OUTPUT=foo }}

D.

run: echo "::set-env name=MY OUTPUT::foo"

Question 3

As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?

As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?

Options:

A.

core.info('Something went wrong, but it\'s not bad enough to fail the build.')

B.

core.notice('Something went wrong, but it\’s not bad enough to fail the build.')

C.

core.warning('Something went wrong, but it\'s not bad enough to fail the build.')

D.

core.warn('Something went wrong, but it\'s not bad enough to fail the build.')

Question 4

How can GitHub Actions encrypted secrets be used in if: conditionals within a workflow job?

Options:

A.

Set the encrypted secret as a job-level environment variable and then reference the environment variable within the conditional statement.

B.

Create a job dependency that exposes the encrypted secret as a job output, which can then be leveraged in a subsequent dependent job.

C.

Use the secrets context within the conditional statement, e.g. ${{ secrets.MySuperSecret }}.

D.

Use a workflow command to expose the encrypted secret via a step's output parameter and then use the step output in the job's if: conditional.

Question 5

Which workflow command would output the debug message "action successfully debugged"?

Options:

A.

echo :debug::message=action successfully debugged"

B.

echo "debug-action successfully debugged"

C.

echo "::debug::action successfully debugged"

D.

echo ":debug:action successfully debugged:"

Question 6

As a developer, you need to integrate a GitHub Actions workflow with a third-party code quality provider that uses the Checks API. How should you trigger a follow-up workflow?

Options:

A.

Add the workflow_run webhook event as a trigger for the workflow for the code quality integration name

B.

Add the check_run webhook event as a trigger for the workflow when the code quality integration is completed

C.

Add the pull_request webhook event as a trigger for the workflow when the code quality integration is synchronized

D.

Add the deployment webhook event as a trigger for the workflow when the code quality integration is completed

Question 7

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

Options:

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

Question 8

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 9

What are the two ways to pass data between jobs? (Choose two.)

Options:

A.

Use the copy action with restore parameter to restore the data from the cache

B.

Use the copy action to save the data that should be passed in the artifacts folder.

C.

Use the copy action with cache parameter to cache the data

D.

Use data storage.

E.

Use job outputs

F.

Use artifact storage.

Question 10

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 11

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

Your organization is managing secrets using GitHub encrypted secrets, including a secret named SuperSecret. As a developer, you need to create a version of that secret that contains a different value for use in a workflow that is scoped to a specific repository named MyRepo. How should you store the secret to access your specific version within your workflow?

Options:

A.

Create a duplicate entry for SuperSecret in the encrypted secret store and specify MyRepo as the scope.

B.

Create MyRepo_SuperSecret in GitHub encrypted secrets to specify the scope to MyRepo.

C.

Create a file with the SuperSecret. information in the .qithub/secrets folder in MyRepo.

D.

Create and access SuperSecret from the secrets store in MyRepo.

Question 14

You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?

Options:

A.

check_suite

B.

workflow_run

C.

deployment

D.

repository_dispatch

Question 15

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

Options:

A.

Use a commit hash.

B.

Use a branch name.

C.

Use a patch release tag.

D.

Use a major release tag.

Question 16

Which workflow commands send information from the runner? (Choose two.)

Options:

A.

reading from environment variables

B.

setting a debug message

C.

populating variables in a Dockerfile

D.

setting output parameters

Question 17

Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. In which scenarios would temporarily disabling a workflow be most useful? (Choose two.)

Options:

A.

A workflow sends requests to a service that is down.

B.

A workflow error produces too many, or wrong, requests, impacting external services negatively.

C.

A workflow is configured to run on self-hosted runners

D.

A workflow needs to be changed from running on a schedule to a manual trigger

E.

A runner needs to have diagnostic logging enabled.

Question 18

You are reaching your organization's storage limit for GitHub artifacts and packages. What should you do to prevent the storage limit from being reached? (Choose two.)

Options:

A.

Delete artifacts from the repositories manually

B.

Disable branch protections in the repository.

C.

Use self-hosted runners for all workflow runs.

D.

Configure the artifact and log retention period.

E.

Configure the repo to use Git Large File Storage.

Question 19

As a developer, you want to review the step that caused a workflow failure and the failed step's build logs. First navigate to the main page of the repository on GitHub. Which section contains the step failure information?

Options:

A.

Insights

B.

Code

C.

Actions

D.

Pull requests

E.

Issues

Question 20

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 21

Which statement is true about using default environment variables?

Options:

A.

The environment variables can be read in workflows using the ENV: variable_name syntax.

B.

The environment variables created should be prefixed with GITHUB_ to ensure they can be accessed in workflows

C.

The environment variables can be set in the defaults: sections of the workflow

D.

The GITHUB_WORKSPACE environment variable should be used to access files from within the runner.

Page: 1 / 5
Total 72 questions