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

Exact2Pass Menu

Question # 4

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?

A.

B.

C.

D.

Full Access
Question # 5

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

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.

Full Access
Question # 6

As a developer, you are optimizing a GitHub workflow that uses and produces many different files. You need to determine when to use caching versus workflow artifacts. Which two statements are true? (Choose two.)

A.

Use cachingwhen reusing files that change rarely between jobs or workflow runs.

B.

Use artifacts when referencingfiles produced by a job after a workflow has ended.

C.

Use caching to store cache entries for up to 30 days between accesses.

D.

Use artifacts to access theGitHub Package Registry and download a package for a workflow

Full Access
Question # 7

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.

Full Access
Question # 8

What is the minimal syntax for declaring an output named foo for an action?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 9

You installed specific software on a Linux self-hosted runner. You have users with workflows that need to be able to select the runner based on the identified custom software. Which steps should you perform to prepare the runner and your users to run these workflows? (Choose two.)

A.

Create the group custom-software-on-linux and move the runner into the group.

B.

Inform users to identify the runner based on the group.

C.

Add the label custom-software to the runner.

D.

Configure the webhook and network to enable GitHub to trigger workflow.

E.

Add the label linux to the runner.

Full Access
Question # 10

Where should workflow files be stored to be triggered by events in a repository?

A.

.github/workflows/

B.

.github/actions/

C.

Nowhere; they must be attached to an act on in the GitHub user interface

D.

anywhere

E.

.workflows/

Full Access
Question # 11

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

A.

repo name

B.

tag

C.

commit SHA

D.

organization name

E.

default branch

Full Access
Question # 12

How many jobs will result from the following matrix configuration?

A.

3 jobs

B.

4 jobs

C.

5 jobs

D.

6 jobs

Full Access
Question # 13

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.

Full Access
Question # 14

Which of the following scenarios requires a developer to explicitly use the GITHUB_TOKEN or github.token secret within a workflow? (Choose two.)

A.

passing the GITHUB_TOKEN secret to an action that requires a token as an input

B.

making an authenticated GitHub API request

C.

checking out source code with the actions/checkout@v3 action

D.

assigning non-default permissions to the GITHUB_TOKEN

Full Access
Question # 15

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

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

Full Access
Question # 16

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

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"

Full Access
Question # 17

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?

A.

Insights

B.

Code

C.

Actions

D.

Pull requests

E.

Issues

Full Access
Question # 18

You are a developer, and your container jobs are failing on a self-hosted runner. Which requirements must you check to ensure that the self-hosted runner is properly configured? (Choose two.)

A.

The self-hosted runner is running a Linux operating system.

B.

The self-hosted runner is running a Windows operating system.

C.

Docker is installed on the self-hosted runner.

D.

Kubernetes is installed on the self-hosted runner.

E.

The service status of Kubernetes is "active".

Full Access
Question # 19

As a developer, you are using a Docker container action in your workflow. What is required for the action to run successfully?

A.

The job env must be set to a Linux environment.

B.

The job runs-on must specify a Linux machine with Docker installed.

C.

The referenced action must be hosted on Docker Hub.

D.

The action must be published to the GitHub Marketplace.

Full Access
Question # 20

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.

Full Access
Question # 21

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?

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.

Full Access