Free GH-200 Exam Braindumps
GitHub Actions Questions 17–24 (page: 4)

Updated On: 9-Apr-2026

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

  1. The self-hosted runner is running a Linux operating system.
  2. The self-hosted runner is running a Windows operating system.
  3. Docker is installed on the self-hosted runner.
  4. Kubernetes is installed on the self-hosted runner.
  5. The service status of Kubernetes is "active".

Answer(s): A,C

Explanation:

While Docker can run on various operating systems, Linux is often the most common and preferred OS for containerized workloads. Docker works well on Linux and is a widely-used platform for running containers.
For container jobs to run on a self-hosted runner, Docker must be installed and properly configured on the runner. Docker is required to build and run containerized workloads in a GitHub Actions workflow.



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

  1. repo name
  2. tag
  3. commit SHA
  4. organization name
  5. default branch

Answer(s): B,C

Explanation:

Using a tag is a best practice because tags are immutable and represent a fixed version of your action. By referencing tags, consumers of your action can be assured they are using a stable and specific version of the action, which helps in avoiding issues with breaking changes. The commit SHA is another reliable way to specify a particular version of an action. By referencing a specific commit SHA, consumers can ensure they are using exactly the code that was written at that moment, avoiding the potential for changes in the future.



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

  1. Create a custom action to wrap the cloud provider's CLI.
  2. Search GitHub Marketplace for verified actions published by the cloud provider.
  3. Use the actions/jenkins-plugin action to utilize an existing Jenkins plugin for the cloud provider.
  4. Search GitHub Marketplace for actions created by GitHub.
  5. Download the CLI for the cloud provider and review the associated documentation.

Answer(s): 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.



GitHub-hosted runners support which capabilities? (Choose two.)

  1. automatic patching of both the runner and the underlying OS
  2. automatic file-system caching between workflow runs
  3. support for Linux, Windows, and mac
  4. support for a variety of Linux variations including CentOS, Fedora, and Debian
  5. requiring a payment mechanism (e.g., credit card) to use for private repositories

Answer(s): C,D

Explanation:

GitHub-hosted runners automatically handle patching, meaning they will be kept up to date with the latest security updates and software patches for both the runner environment and the underlying operating system.
GitHub-hosted runners support Linux, Windows, and macOS, giving you flexibility to run workflows on different operating systems without needing to manage your own self-hosted runners.



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?

  1. POST /repos/:owner/:repo/actions/runs/:run_id
  2. GET /repos/:owner/:repo/actions/artifacts/logs
  3. GET /repos/:owner/:repo/actions/runs/:run_id/logs
  4. POST /repos/:owner/:repo/actions/runs/:run_id/logs

Answer(s): C

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.



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

  1. Use caching when reusing files that change rarely between jobs or workflow runs.
  2. Use artifacts when referencing files produced by a job after a workflow has ended.
  3. Use caching to store cache entries for up to 30 days between accesses.
  4. Use artifacts to access the GitHub Package Registry and download a package for a workflow

Answer(s): A,B

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.



As a developer, you are designing a workflow and need to communicate with the runner machine to set environment variables, output values used by other actions, add debug messages to the output logs, and other tasks.
Which of the following options should you use?

  1. environment variables
  2. workflow commands
  3. self-hosted runners
  4. enable debug logging
    E composite run step

Answer(s): B

Explanation:

Workflow commands are special commands that allow you to interact with the runner, set environment variables, output values, add debug messages, and perform other tasks within the workflow. These commands are used to modify the environment or influence the behavior of the GitHub Actions runner.



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

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

Answer(s): 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.



Viewing page 4 of 10
Viewing questions 25 - 32 out of 124 questions


Post your Comments and Discuss Microsoft GH-200 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!