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

GitHub GitHub-Actions - GitHub Actions Certificate Exam

Page: 1 / 3
Total 72 questions

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.

Which scopes are available to define custom environment variables within a workflow file? (Choose three.)

A.

the entire workflow, by using env at the top level of the workflow file

B.

all jobs being run on a single Actions runner, by using runner.env at the top of the workflow file

C.

the entire stage, by using env at the top of the defined build stage

D.

within the run attribute of a job step

E.

the contents of a job within a workflow, by using jobs..env

F.

a specific step within a job, by using jobs..steps[*].env

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?

A.

via the .github repository owned by the organization

B.

via repositories owned by the organization

C.

via the GitHub Marketplace

D.

via a repository owned by a third party

In which scenarios could the GITHUB_TOKEN be used? (Choose two.)

A.

to leverage a self-hosted runner

B.

to create a repository secret

C.

to publish to GitHub Packages

D.

to create issues in the repo

E.

to read from the file system on the runner

F.

to add a member to an organization

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

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Which statement is true about using default environment variables?

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.

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?

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.

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

A.

check_suite

B.

workflow_run

C.

deployment

D.

repository_dispatch

As a developer, which workflow steps should you perform to publish an image to the GitHub Container Registry? (Choose three.)

A.

Use the actions/setup-docker action

B.

Authenticate to the GitHub Container Registry.

C.

Build the container image.

D.

Push the image to the GitHub Container Registry

E.

Pull the image from the GitHub Container Registry.

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.