Summer Sale - Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70dumps

GH-200 Questions and Answers

Question # 6

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

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

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.

Full Access
Question # 8

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

A.

Dockerfile

B.

Actionfile

C.

metadata.yml

D.

action.yml

Full Access
Question # 9

As a DevOps engineer, you are developing a composite action. You have a step that needs to be executed against a subdirectory. Which code snippet should you use within the composite action to specify the directory?

A.

runs:

using: " composite "

steps:

- run: $GITHUB_ACTION_PATH/script.sh

directory: ${{ inputs.dir }}

shell: bash

B.

runs:

using: " composite "

directory: ${{ inputs.dir }}

steps:

- run: $GITHUB_ACTION_PATH/script.sh

shell: bash

C.

runs:

using: " composite "

working-directory: ${{ inputs.dir }}

steps:

- run: $GITHUB_ACTION_PATH/script.sh

shell: bash

D.

runs:

using: " composite "

steps:

- run: $GITHUB_ACTION_PATH/script.sh

working-directory: ${{ inputs.dir }}

shell: bash

Full Access
Question # 10

Which workflow event is used to manually trigger a workflow run?

A.

create

B.

workflow_dispatch

C.

workflow_run

D.

status

Full Access
Question # 11

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?

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

Full Access
Question # 12

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

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.

Full Access
Question # 13

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

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.

Full Access
Question # 14

You need to perform a task that requires running a custom script in a GitHub Actions workflow. The script must run within the workflow environment without requiring an external container or prebuilt image.

What should you use?

A.

a JavaScript action

B.

a Docker container action

C.

a run step

D.

a composite action

Full Access
Question # 15

Which default GitHub environment variable indicates the owner and repository name?

A.

REPOSITORY NAME

B.

GITHUB REPOSITORY

C.

ENV REPOSITORY

D.

GITHUB WORKFLOW REPO

Full Access
Question # 16

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

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

Full Access
Question # 17

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.

Full Access
Question # 18

What is the smallest scope for an environment variable?

A.

the workflow settings

B.

a step

C.

a job

D.

the workflow env mapping

Full Access
Question # 19

You need to create a reusable GitHub Actions workflow template named ci.yml. The solution must ensure that ci.yml appears on the New workflow interface of GitHub Actions. Where should you store ci.yml?

A.

.github/workflows

B.

.github/templates

C.

.github/workflow-templates

D.

the root directory of each repository

Full Access
Question # 20

What is the most secure way to store sensitive information in GitHub Actions workflows?

A.

Use environment variables in the workflow and store sensitive data directly in the variables.

B.

From the GitHub repository settings, store sensitive data as unencrypted text.

C.

Store the sensitive information as plain text in the workflow YAML file.

D.

Use GitHub Enterprise Managed User (OIDC) integration to dynamically fetch secrets from a third-party secrets manager.

Full Access
Question # 21

As a developer, you need to leverage Redis in your workflow. What is the best way to use Redis on a self-hosted Linux runner without affecting future workflow runs?

A.

Add a run step to your workflow, which dynamically installs and configures Redis as part of your job.

B.

Specify container: and services: in your job definition to leverage a Redis service container.

C.

Set up Redis on a separate machine and reference that instance from your job.

D.

Install Redis on the hosted runner image and place it in a runner group. Specify label: in your job to target the runner group.

Full Access
Question # 22

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

A.

@actions/github toolkit

B.

JavaScript dist/ folder

C.

Dockerfile CMD

D.

a non-zero exit code

E.

output variable

F.

composite run step

Full Access
Question # 23

You create a self-hosted runner labeled as runner1.

You need to ensure that a GitHub Actions workflow job runs only on runner1.

Which YAML statement should you use?

A.

runs-on: [self-hosted, linux-xlarge]

B.

runs-on: - self-hosted - ubuntu-latest

C.

runs-on: [self-hosted, runner1]

D.

runs-on: self-hosted

Full Access
Question # 24

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

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 caching when reusing files that change rarely between jobs or workflow runs.

B.

Use artifacts when referencing files 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 the GitHub Package Registry and download a package for a workflow

Full Access
Question # 26

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

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

What menu options in a repository do you need to select in order to use a starter workflow that is provided by your organization?

A.

Actions > Load workflow

B.

Workflow > New workflow

C.

Workflow > Load workflow

D.

Actions > New workflow

Full Access
Question # 29

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

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.

Full Access
Question # 30

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

A.

inputs.yml

B.

config.json

C.

defaults.json

D.

workflow.yml

E.

action.yml

Full Access