Prepare Important Exam with GH-200 Exam Dumps(2025) [Q44-Q67]

Share

Prepare Important Exam with GH-200 Exam Dumps(2025) 

Pass Exam Questions Efficiently With GH-200 Questions

NEW QUESTION # 44
What metadata file in a custom action defines the main entry point?

  • A. index.js
  • B. action.yml
  • C. main.yml
  • D. action.js

Answer: B

Explanation:
The action.yml file is the metadata file in a custom GitHub Action that defines the main entry point, including information such as the inputs, outputs, description, and the runs key that specifies the main entry point (e.g., a script or a Docker container).


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

  • A. Use the actions/jenkins-plugin action to utilize an existing Jenkins plugin for the cloud provider.
  • B. Search GitHub Marketplace for verified actions published by the cloud provider.
  • C. Create a custom action to wrap the cloud provider's CLI.
  • D. Search GitHub Marketplace for actions created by GitHub.
  • E. Download the CLI for the cloud provider and review the associated documentation.

Answer: B

Explanation:
Searching the GitHub Marketplace for verified actions published by the cloud provider is the quickest and safest approach. Many cloud providers offer verified GitHub Actions that are maintained and optimized to interact with their services. These actions typically come with the correct configurations and best practices, allowing you to get started quickly without reinventing the wheel.


NEW QUESTION # 46
Which action type should be used to bundle a series of run steps into a reusable custom action?

  • A. Bash script action
  • B. JavaScript action
  • C. Composite action
  • D. Docker container action

Answer: C

Explanation:
A composite action allows you to bundle multiple steps into a single reusable action within a workflow. It is composed of multiple run steps or other actions and can be reused across workflows, making it the perfect choice for bundling a series of steps.


NEW QUESTION # 47
What are the two ways to pass data between jobs? (Choose two.)

  • A. Use the copy action to save the data that should be passed in the artifacts folder.
  • B. Use job outputs
  • C. Use data storage.
  • D. Use artifact storage.
  • E. Use the copy action with restore parameter to restore the data from the cache
  • F. Use the copy action with cache parameter to cache the data

Answer: B,D

Explanation:
Job outputs are used to pass data from one job to another in a workflow. A job can produce output values (like variables or files), which can be referenced by subsequent jobs using the needs keyword and ${{ steps.step_id.outputs.output_name }} syntax.
Artifact storage allows data (such as files or results) to be saved by a job and then retrieved by another job in a later step. This is commonly used for passing large amounts of data or files between jobs.


NEW QUESTION # 48
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?

  • A. Dynamically provision and deprovision an environment.
  • B. It is currently impossible to access the database with GitHub Actions.
  • C. Use service containers with a Postgres database from Docker hub.
  • D. Run the actions/postgres action in a parallel job.

Answer: C

Explanation:
GitHub Actions supports the use of service containers, which allows you to spin up a PostgreSQL database (or any other service) in a Docker container during your workflow. You can pull a PostgreSQL image from Docker Hub, and the container will automatically be available to your workflow job. This method requires no additional infrastructure and is easy to configure and maintain, as you simply define the container in the workflow file.


NEW QUESTION # 49
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 caching to store cache entries for up to 30 days between accesses.
  • C. Use artifacts to access the GitHub Package Registry and download a package for a workflow
  • D. Use artifacts when referencing files produced by a job after a workflow has ended.

Answer: A,D

Explanation:
Caching is ideal for files that change rarely, such as dependencies or build outputs, as it speeds up subsequent workflow runs by reusing previously cached files instead of re-downloading or rebuilding them.
Artifacts are used for persisting files produced during a job that need to be used in later jobs or after the workflow has ended, allowing them to be downloaded or referenced later.


NEW QUESTION # 50
Which default environment variable specifies the branch or tag that triggered a workflow?

  • A. GITHUB_TAG
  • B. ENV_BRANCH
  • C. GITHUB_REF
  • D. GITHUB_BRANCH

Answer: C

Explanation:
The GITHUB_REF environment variable specifies the branch or tag that triggered the workflow. It contains the full reference to the branch or tag, such as refs/heads/main for a branch or refs/tags/v1.0 for a tag.


NEW QUESTION # 51
What is the minimal syntax for declaring an output named foo for an action?

  • A.
  • B.
  • C.
  • D.

Answer: A

Explanation:
The correct minimal syntax for declaring an output in GitHub Actions is by using the foo key under outputs, and associating it with a value (in this case, Some value). This is the simplest form to define an output in a workflow or action.


NEW QUESTION # 52
What is the smallest scope for an environment variable?

  • A. the workflow env mapping
  • B. a job
  • C. a step
  • D. the workflow settings

Answer: C

Explanation:
The smallest scope for an environment variable is within a step. Environment variables defined within a step are only accessible to that particular step, which makes it the smallest scope for a variable in a GitHub Actions workflow.


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

  • A. making an authenticated GitHub API request
  • B. checking out source code with the actions/checkout@v3 action
  • C. assigning non-default permissions to the GITHUB_TOKEN
  • D. passing the GITHUB_TOKEN secret to an action that requires a token as an input

Answer: A,D

Explanation:
Some actions may require a GITHUB_TOKEN as an input to authenticate and perform specific tasks, such as creating issues, commenting on pull requests, or interacting with the GitHub API. In such cases, you would need to explicitly pass the token to the action.
When making an authenticated GitHub API request, the GITHUB_TOKEN is required to authenticate the request. This token is automatically provided by GitHub in the workflow, and it must be explicitly used when interacting with the GitHub API.


NEW QUESTION # 54
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. Individual third-party actions enabled with a specific tag will prevent updated versions of the action from introducing vulnerabilities.
  • B. Actions can be restricted to only those available in the enterprise.
  • C. GitHub-verified actions can be collectively enabled for use in the enterprise.
  • D. Actions created by GitHub are automatically enabled and cannot be disabled.
  • E. Specific actions can individually be enabled for the organization, including version information.
  • F. Actions can be published to an internal marketplace.

Answer: C,E,F

Explanation:
You can enable specific actions for the organization by identifying them and providing version control, ensuring only trusted versions are used in workflows.
GitHub-verified actions can be enabled at the enterprise level, providing an extra layer of security by ensuring that only trusted actions are available to workflows.
Actions can be published to an internal marketplace, allowing organizations to share reusable actions securely within their enterprise without exposing them to the public.


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

  • A. The referenced action must be hosted on Docker Hub.
  • B. The action must be published to the GitHub Marketplace.
  • C. The job runs-on must specify a Linux machine with Docker installed.
  • D. The job env must be set to a Linux environment.

Answer: C

Explanation:
For a Docker container action to run in a GitHub Actions workflow, the runner must have Docker installed. The runs-on attribute of the job should specify an environment that supports Docker, typically a Linux environment (e.g., ubuntu-latest), since Docker is widely supported and commonly used in Linux-based environments.


NEW QUESTION # 56
What are the two types of environment protection rules you can configure? (Choose two.)

  • A. wait timer
  • B. artifact storage
  • C. required reviewers
  • D. branch protections

Answer: A,C

Explanation:
Required reviewers is a protection rule where you can specify that certain individuals or teams must review and approve the workflow run before it can proceed. This is used to enforce approvals before certain steps or environments are accessed.
Wait timer is a protection rule that introduces a delay before a workflow can proceed to the next stage. This is useful for adding time-based constraints to the deployment process or ensuring that certain conditions are met before a workflow continues.


NEW QUESTION # 57
Your organization needs to simplify reusing and maintaining automation in your GitHub Enterprise Cloud. Which components can be directly reused across all repositories in an organization? (Choose three.)

  • A. self-hosted runners
  • B. workflow templates
  • C. encrypted secrets
  • D. actions stored in an organizational partition in the GitHub Marketplace
  • E. actions stored m private repositories in the organization
  • F. custom Docker actions stored in GitHub Container Registry

Answer: B,C,E

Explanation:
Actions stored in private repositories within the organization can be reused across all repositories by referencing them in workflows. This ensures a centralized way of maintaining custom actions.
Encrypted secrets can be accessed across repositories in the same organization, making it easy to store sensitive data (like API keys or tokens) securely while allowing multiple workflows to access them.
Workflow templates allow you to create reusable templates for workflows that can be shared across repositories within the organization. This makes it easier to standardize processes and automate them across multiple projects.


NEW QUESTION # 58
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. 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.
  • B. 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.
  • C. 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.
  • D. Store the token in a configuration file in a private repository. Use GitHub Actions to deploy the configuration file to the runtime environment.
  • E. 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.

Answer: A,C

Explanation:
Using a corporate secret store like HashiCorp Vault provides a secure, centralized location for sensitive information. GitHub Actions can then retrieve and store the token securely during deployment by setting it as an environment variable, ensuring the token remains secure and accessible at runtime.
Storing the token as an organizational-level encrypted secret in GitHub ensures it is accessible across multiple repositories, minimizing management overhead. GitHub Actions can then use this secret during deployment by setting it as an environment variable, allowing the microservice to access it securely at runtime.


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

  • A. Build the container image.
  • B. Authenticate to the GitHub Container Registry.
  • C. Use the actions/setup-docker action
  • D. Pull the image from the GitHub Container Registry.
  • E. Push the image to the GitHub Container Registry

Answer: B,C,E

Explanation:
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.


NEW QUESTION # 60
Which of the following statements are true regarding the use of GitHub Actions on a GitHub Enterprise Server instance? (Choose three.)

  • A. Actions must be defined in the .github repository
  • B. Third party actions can be manually synchronized for use on GitHub Enterprise Server
  • C. Use of GitHub Actions on GitHub Enterprise Server requires a persistent internet connection
  • D. Third party actions can be used on GitHub Enterprise Server by configuring GitHub Connect
  • E. Actions created by GitHub are automatically available and cannot be disabled
  • F. Most GitHub authored actions are automatically bundled for use on GitHub Enterprise Server

Answer: B,C,D

Explanation:
GitHub Actions on GitHub Enterprise Server often requires an internet connection, especially for accessing actions from the GitHub Marketplace or third-party actions unless they are manually synced to the server.
To use third-party actions on GitHub Enterprise Server, GitHub Connect can be used to establish a connection between the server and GitHub.com, enabling access to third-party actions.
Third-party actions can also be manually synchronized to the GitHub Enterprise Server, making them available for use in workflows.


NEW QUESTION # 61
Which of the following is the best way for an enterprise to prevent certain marketplace actions from running?

  • A. Create a list of the actions that are restricted from being used as an enterprise policy. Every other action can be run.
  • B. Create a list that is maintained as a . yml file in a . github repository specified in the enterprise. Only these actions can be run.
  • C. It is not possible; if an action is in the marketplace, its use cannot be restricted.
  • D. Create a list of the actions that are allowed to run as an enterprise policy. Only these actions can be run.

Answer: D

Explanation:
The best way for an enterprise to control which GitHub Actions run is by creating a list of approved actions as an enterprise policy. This approach restricts workflows to only use the actions that are explicitly allowed, ensuring security and compliance within the organization.


NEW QUESTION # 62
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 read from the file system on the runner
  • D. to create issues in the repo
  • E. to publish to GitHub Packages
  • F. to add a member to an organization

Answer: D,E

Explanation:
The GITHUB_TOKEN is automatically provided by GitHub in workflows and can be used to authenticate API requests to GitHub, including publishing packages to GitHub Packages.
The GITHUB_TOKEN is also used to authenticate API requests for actions like creating issues, commenting, or interacting with pull requests within the same repository.


NEW QUESTION # 63
Which workflow commands send information from the runner? (Choose two.)

  • A. reading from environment variables
  • B. populating variables in a Dockerfile
  • C. setting output parameters
  • D. setting a debug message

Answer: C,D

Explanation:
Setting a debug message using ::debug:: command sends a message to the logs, helping with troubleshooting and providing insight into the workflow run.
Setting output parameters using ::set-output sends data from a job step to subsequent steps or jobs, which can be used later in the workflow.


NEW QUESTION # 64
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. Locate the self-hosted runner in your repository's settings page and download its log archive.
  • B. Start the self-hosted runner with the --debug flag to produce more verbose console output.
  • C. Access the self-hosted runner's installation directory and look for log files in the _diag folder.
  • D. Set the DEBUG environment variable to true before starting the self-hosted runner to produce more verbose console output.

Answer: C

Explanation:
When troubleshooting a self-hosted runner, you can access the _diag folder located in the self-hosted runner's installation directory. This folder contains diagnostic logs that can help you identify the root cause of issues, such as connection problems.


NEW QUESTION # 65
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. Workflow > Load workflow
  • B. Actions > Load workflow
  • C. Workflow > New workflow
  • D. Actions > New workflow

Answer: D

Explanation:
To use a starter workflow provided by your organization, you need to go to the Actions tab in the repository and select New workflow. This option allows you to either create a new workflow or select from a list of available workflow templates, including starter workflows provided by your organization.


NEW QUESTION # 66
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?

  • A. GET /repos/:owner/:repo/actions/runs/:run_id/logs
  • B. POST /repos/:owner/:repo/actions/runs/:run_id
  • C. GET /repos/:owner/:repo/actions/artifacts/logs
  • D. POST /repos/:owner/:repo/actions/runs/:run_id/logs

Answer: A

Explanation:
The GET /repos/:owner/:repo/actions/runs/:run_id/logs API endpoint is used to retrieve the logs of a specific workflow run identified by run_id. This is the correct method for downloading logs from a workflow run.


NEW QUESTION # 67
......


Microsoft GH-200 Exam Syllabus Topics:

TopicDetails
Topic 1
  • Consume Workflows: This domain targets Software Developers and Quality Assurance Engineers and focuses on interpreting workflow runs and their outcomes. It covers identifying triggering events, reading workflow configurations, troubleshooting failures by analyzing logs, enabling debug logging, managing environment variables, caching dependencies, and passing data between jobs. Candidates also manage workflow runs, artifacts, approvals, and status badges, as well as locating workflows within repositories and leveraging organizational templated workflows.
Topic 2
  • Manage GitHub Actions in the Enterprise: This section measures the expertise of Enterprise Administrators and Platform Engineers in distributing and managing GitHub Actions and workflows at the organizational level. It includes reuse and sharing of templates, strategies for managing reusable components via repositories and naming conventions, controlling access to actions, setting organization-wide usage policies, and planning maintenance to ensure efficient enterprise-wide deployment of GitHub Actions.
Topic 3
  • Author and Maintain Actions: This domain evaluates the abilities of Action Developers and Automation Engineers to select and create suitable types of GitHub Actions, such as JavaScript, Docker containers, or run steps. It emphasizes troubleshooting action code, understanding the components and file structures of actions, and using workflow commands within actions to communicate with runners, including exit code management.
Topic 4
  • Author and Maintain Workflows: This section of the exam measures skills of DevOps Engineers and Automation Specialists and covers building and managing workflows triggered by events such as pushes, scheduled times, manual triggers, and webhooks. It includes understanding workflow components like jobs, steps, actions, and runners, syntax correctness, environment variables, secrets management, and dependencies between jobs. Candidates will also demonstrate practical abilities to create workflows for various purposes, including publishing packages, using service containers, routing jobs, and deploying releases to cloud providers.

 

GH-200 Questions - Truly Beneficial For Your Microsoft Exam: https://passcollection.actual4labs.com/Microsoft/GH-200-actual-exam-dumps.html

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 )
From Monday to Saturday

Support: Contact now