2026 Updated Verified Pass GH-200 Exam - Real Questions and Answers
Dumps Moneyack Guarantee - GH-200 Dumps Approved Dumps
NEW QUESTION # 33
What are two reasons to keep an action in its own repository instead of bundling it with other application code? (Each correct answer presents a complete solution. Choose two.)
- A. It allows sharing workflow secrets with other users.
- B. It widens the scope of the code base for developers fixing issues and extending the action.
- C. It decouples the action's versioning from the versioning of other application code.
- D. It makes the action.yml file optional.
- E. It makes it easier for the GitHub community to discover the action.
Answer: C,E
Explanation:
Storing an action in its own repository makes it easier for the GitHub community to discover the action [B], narrows the scope [Not C] of the code base for developers fixing issues and extending the action, and decouples the action's versioning from the versioning of other application code
[D].
Reference:
https://docs.github.com/en/actions/how-tos/create-and-publish-actions/manage-custom-actions
NEW QUESTION # 34
As a DevOps engineer, you are developing workflows to build an application. You have a requirement to create the build targeting multiple node versions. Which code block should you use to define the workflow?
- A.

- B.

- C.

- D.

Answer: B
Explanation:
Use keywords strategy and matrix in that order.
Last line should be node-version: ${{ matrix.node-ver}}
Reference:
https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job- variations
NEW QUESTION # 35
As a developer, you are configuring GitHub Actions to deploy VMs to production. A member of the VMOps team must provide approval before the deployment occurs. Which of the following steps should you take? (Each correct answer presents part of the solution. Choose two.)
- A. Navigate to the repository settings and create a Production environment with the VMOps team as a required reviewer.
- B. Specify the environment named Production in the workflow jobs that deploy to the VMs.
- C. Add the VMs to the environment.
- D. Specify the VMOps team as the owner of the environment.
- E. Navigate to the organization settings and create a Production environment with the VMOps team as a required reviewer.
Answer: A
Explanation:
Creating an environment
To configure an environment in a personal account repository, you must be the repository owner.
To configure an environment in an organization repository, you must have admin access.
On GitHub, navigate to the main page of the repository.
Under your repository name, click Settings. ...
In the left sidebar, click Environments.
Click New environment.
Enter a name for the environment, then click Configure environment.
Etc.
Reference:
https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/manage- environments
NEW QUESTION # 36
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/logs
- C. GET /repos/:owner/:repo/actions/artifacts/logs
- D. POST /repos/:owner/:repo/actions/runs/:run_id
Answer: A
Explanation:
REST API endpoints for workflow jobs
You can use the REST API to view logs and workflow jobs in GitHub Actions.
Download job logs for a workflow run
Gets a redirect URL to download a plain text file of logs for a workflow job.
Code samples for "Download job logs for a workflow run"
Request example
Get /repos/{owner}/{repo}/actions/jobs/{job_id}/logs
Reference:
https://docs.github.com/en/rest/actions/workflow-jobs
NEW QUESTION # 37
As a developer, your Actions workflow often reuses the same outputs or downloaded dependencies from one run to another. To cache dependencies for a job, you are using the GitHub cache action. Which input parameters are required for this action? (Each correct answer presents part of the solution. Choose two.)
- A. cache-hit: the copy action key used with restore parameter to restore the data from the cache
- B. ref: the ref name of the branch to access and restore a cache created
- C. key: the key created when saving a cache and the key used to search for a cache
- D. dependency: the name and version of a package to cache or restore
- E. path: the file path on the runner to cache or restore
- F. restore-keys: the copy action key used with cache parameter to cache the data
Answer: C,E
Explanation:
Input parameters for the cache action
[C] key: Required The key created when saving a cache and the key used to search for a cache.
It can be any combination of variables, context values, static strings, and functions. Keys have a maximum length of 512 characters, and keys longer than the maximum length will cause the action to fail.
[A] path: Required The path(s) on the runner to cache or restore.
Reference:
https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching
NEW QUESTION # 38
Which step is using the dbserver environment variable correctly?
- A. steps:
- name: Hello world
run: echo $dbserver
env:
dbserver: orgserver1 - B. steps:
- name: Hello world
run: echo $dbserver
env:
- name: dbserver
value: orgserver1 - C. steps:
- name: Hello world
run: echo $dbserver
variables:
dbserver: orgserver1 - D. steps:
- name: Hello world
run: echo $dbserver
environment:
dbserver: orgserver1
Answer: A
Explanation:
Store information in variables
GitHub sets default variables for each GitHub Actions workflow run. You can also set custom variables for use in a single workflow or multiple workflows.
Defining environment variables for a single workflow
To set a custom environment variable for a single workflow, you can define it using the env key in the workflow file. The scope of a custom variable set by this method is limited to the element in which it is defined. You can define variables that are scoped for:
The entire workflow, by using env at the top level of the workflow file.
The contents of a job within a workflow, by using jobs.<job_id>.env.
A specific step within a job, by using jobs.<job_id>.steps[*].env.
Reference:
https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use- variables
NEW QUESTION # 39
As a developer, you want to run a workflow from the Actions tab in GitHub. Which YAML snippet should you use to match the interface in this image?
- A.

- B.

- C.

- D.

Answer: D
Explanation:
The first image shows a workflow trigger with an option for the test suite, and the chosen YAML configuration matches this interface. Specifically, the test suite input is defined with type: choice and includes the option value: functional, which aligns with the visible UI elements in the first image.
NEW QUESTION # 40
Which of the following is the best way for an enterprise to prevent certain marketplace actions from running?
- A. It is not possible; if an action is in the marketplace, its use cannot be restricted.
- B. Create a list of the actions that are allowed to run as an enterprise policy. Only these actions can be run.
- C. Create a list of the actions that are restricted from being used as an enterprise policy. Every other action can be run.
- D. Create a list that is maintained as a . yml file in a . github repository specified in the enterprise. Only these actions can be run.
Answer: B
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 # 41
Which of the following is the most common way to target a specific major release version?
- A. steps:
- uses: actions/checkout@U1673995124 - B. steps:
- uses: actions/checkout - C. steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - D. steps:
- uses: actions/checkout@v3
Answer: D
Explanation:
Example: Using versioned actions
steps:
# Reference a specific commit
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
*-> # Reference the major version of a release
- uses: actions/checkout@v4
# Reference a specific version
- uses: actions/[email protected]
# Reference a branch
- uses: actions/checkout@main
Reference:
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
NEW QUESTION # 42
As a developer, you need to create a custom action written in Python. Which action type should you choose?
As a developer, you need to create a custom action written in Python. Which action type should you choose?
- A. JavaScript action
- B. Python action
- C. Docker container action
- D. composite run step
Answer: C
Explanation:
A Docker container action is ideal for custom actions that require specific environments or dependencies, such as Python. By creating a Docker container, you can define the environment with the necessary Python version and dependencies, and your Python code can run inside that container.
NEW QUESTION # 43
As a developer, you are authoring a workflow that will deploy to both DevCloud and TestCloud resources. Each cloud resource is accessed with a different deployment key. Which approach best allows you to use the same reusable workflow in separate jobs to target the different cloud resources?
- A. Store the different keys in a DEPLOY_KEY environment secret in the DevCloud and TestCloud environments. Specify DEPLOY_KEY in the secrets section of the reusable workflow.
- B. Populate a DEPLOY_KEY repository secret with a JSON object containing DevCloud and TestCloud properties. Then specify DEPLOY_KEY.DevCloud in the secrets sections of the reusable workflow.
- C. Create repository secrets named DevCloud.DEPLOY_KEY and TestCloud.DEPLOY_KEY so that the reusable workflow parses the secrets by resource name.
- D. Use a marketplace action to conditionally parse the DEPLOY_KEY repository secret based on the cloud resource name.
Answer: A
Explanation:
Using inputs and secrets in a reusable workflow
You can define inputs and secrets, which can be passed from the caller workflow and then used within the called workflow.
In the reusable workflow, use the inputs and secrets keywords to define inputs or secrets that will be passed from a caller workflow.
on:
workflow_call:
inputs:
config-path:
required: true
type: string
secrets:
personal_access_token:
required: true
Reference:
https://docs.github.com/en/enterprise-cloud@latest/actions/how-tos/reuse-automations/reuse- workflows
NEW QUESTION # 44
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, runner1]
- B. runs-on: - self-hosted - ubuntu-latest
- C. runs-on: self-hosted
- D. runs-on: [self-hosted, linux-xlarge]
Answer: A
Explanation:
To target a specific self-hosted runner, the job must use runs-on with labels that match that runner. A self-hosted runner normally has the self-hosted label plus default labels and any custom labels you assign. Since the runner is labeled runner1, the workflow should specify both self-hosted and runner1:
runs-on: [self-hosted, runner1]. GitHub Actions will then route the job only to a self-hosted runner matching all specified labels. Option A targets a different custom label. Option B is malformed and also mixes a self-hosted label with a GitHub-hosted runner label. Option D targets any self-hosted runner, not specifically runner1. GitHub documents that an array of runs-on labels requires a runner matching all listed labels.
NEW QUESTION # 45
In GitHub Actions, how is the success or failure of a step determined by its exit code?
- A. Every exit code is a failure
- B. Zero exit code means success and any nonzero means failure
- C. Exit codes are ignored and a maintainer sets the result manually
- D. Success is controlled by continue-on-error rather than the exit code
Answer: B
Explanation:
GitHub Actions evaluates each step by the exit status of the process it runs. The runner marks a step successful when the command finishes with an exit status of 0. If the command returns any other code then the step is marked as failed and the job may stop depending on your workflow configuration.
NEW QUESTION # 46
In a workflow triggered by a pull request comment, which GitHub Actions context property contains the event payload used to access the comment text and the pull request number?
- A. github.repository
- B. github.job
- C. github.event
- D. github.event_path
Answer: C
Explanation:
In a workflow that runs on a pull request comment the event context contains the webhook payload. With github.event you can read the structured fields for the comment text and the pull request number. The comment text is available under the comment body field and the pull request number is available under the issue number for comment events or under the pull request number for pull request events. This makes github.event the direct and convenient source for these values.
NEW QUESTION # 47
Which native method should you use to pass files between jobs within the same GitHub Actions workflow?
- A. Use the copy action with the cache parameter to cache the data.
- B. Use artifact storage.
- C. Use job outputs.
- D. Use an external blob store
Answer: B
Explanation:
The correct native GitHub Actions method for passing files between jobs in the same workflow is artifact storage. Workflow artifacts are designed to persist files produced by one job so they can be downloaded and used by another job later in the workflow. Job outputs are better suited for passing small values, strings, IDs, flags, or metadata between jobs, not full files. Caching is intended to speed up repeated workflow runs by reusing dependencies or build outputs; it is not the proper mechanism for transferring job-produced files. An external blob store can work architecturally, but it is not the native GitHub Actions method. Therefore, artifact storage is the best and most exam-aligned answer for passing files between jobs.
NEW QUESTION # 48
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.
Answer: B
Explanation:
To run a Docker container action, the job's runs-on environment must be a Linux machine that has Docker installed.
Key Requirements
Linux OS Only: Docker container actions are only supported on Linux runners. They cannot run on Windows or macOS runners.
Docker Installed: The runner must have the Docker CLI and daemon installed and running to build and execute the action's container.
GitHub-Hosted Runners: If you use GitHub-hosted runners, you must specify an Ubuntu environment (e.g., runs-on: ubuntu-latest), as these come pre-configured with Docker.
Self-Hosted Runners: For self-hosted runners, you must manually ensure the machine is running Linux and has Docker installed.
Reference:
https://docs.github.com/actions/sharing-automations/creating-actions/creating-a-docker- container-action
NEW QUESTION # 49
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?
- A. environment variables
- B. enable debug logging
- C. self-hosted runners
- D. workflow commands
Answer: D
Explanation:
E composite run step
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.
NEW QUESTION # 50
You need to store an API key in a GitHub repository. The solution must ensure that the key remains secure and can be used in a GitHub Actions workflow. What should you do?
- A. Store the key directly in the workflow YAML file under env:.
- B. Add the key as a plain text variable to the repository README file.
- C. Use repository secrets to encrypt and store the key, and then reference the key in the workflow YAML file.
- D. Commit the key to the repository in an .env file.
Answer: C
Explanation:
To use a specific API key in your GitHub Actions workflow, you can store it as a Repository Secret and reference it using the secrets context in your YAML file. This ensures the key is encrypted and masked in your workflow logs.
1. Store the API Key as a Secret
Navigate to your repository on GitHub.com.
Click Settings > Secrets and variables > Actions.
Select the Secrets tab and click New repository secret.
In the Name field, enter a descriptive identifier (e.g., MY_API_KEY).
Rules: Use only alphanumeric characters or underscores; cannot start with a number or GITHUB_.
In the Secret field, paste your API key value and click Add secret.
2. Reference the Secret in your YAML File
In your .github/workflows/your-workflow.yml file, access the secret using the syntax
${{ secrets.NAME_OF_SECRET }}. It is a best practice to map it to an environment variable within a specific step rather than echoing it directly.
Example Workflow in yaml:
name: Use API Key Example
on: [push]
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: Run script with API Key
# Map the secret to an environment variable for the runner
env:
API_KEY: ${{ secrets.MY_API_KEY }}
run: |
# Use the environment variable in your commands
curl -H "Authorization: Bearer $API_KEY" https://api.example.com
Reference:
https://docs.github.com/actions/security-guides/using-secrets-in-github-actions
NEW QUESTION # 51
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. encrypted secrets
- B. actions stored in an organizational partition in the GitHub Marketplace
- C. workflow templates
- D. actions stored m private repositories in the organization
- E. self-hosted runners
- F. custom Docker actions stored in GitHub Container Registry
Answer: A,C,D
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 # 52
What repository visibility is required for a GitHub Action to be listed on GitHub Marketplace?
- A. Metadata in a subfolder
- B. Public repository
- C. Verified creator status
- D. Use GitHub Container Registry
Answer: B
Explanation:
GitHub only lists actions from repositories that are visible to everyone. This is a firm requirement for publishing an action to the Marketplace and private or internal repositories cannot be listed.
NEW QUESTION # 53
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 and access SuperSecret from the secrets store in MyRepo.
- D. Create a file with the SuperSecret. information in the .qithub/secrets folder in MyRepo.
Answer: B
Explanation:
To scope a secret to a specific repository, you can create a new secret with a name like MyRepo_SuperSecret in the secrets section of the MyRepo repository's settings. This ensures that the secret is specific to that repository and can be used within its workflows.
NEW QUESTION # 54
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? (Each correct answer presents part of the solution. Choose two.)
- A. Inform users to identify the runner based on the group.
- B. Add the label linux to the runner.
- C. Inform users to identify the runner with the labels custom-software and linux.
- D. Add the label custom-software to the runner.
- E. Create the group custom-software-on-linux and move the runner into the group.
- F. Configure the webhook and network to enable GitHub to trigger workflow.
Answer: C,D
Explanation:
[F] Add a label for the custom software as required.
Note: Using labels with self-hosted runners
You can use labels to organize your self-hosted runners based on their characteristics.
Creating a custom label
You can create custom labels for runners at the repository and organization levels.
[C, not D] Linux is a default label and does not have to be created to be used.
Reference:
https://docs.github.com/en/actions/how-tos/manage-runners/self-hosted-runners/apply-labels
NEW QUESTION # 55
......
Microsoft GH-200 Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
Updated PDF (New 2026) Actual Microsoft GH-200 Exam Questions: https://actualtests.vceprep.com/GH-200-latest-vce-prep.html