[Q48-Q69] Top Microsoft GH-200 Courses Online - Updated [Apr-2026]

Share

Top Microsoft GH-200 Courses Online - Updated [Apr-2026]

GH-200 Practice Dumps - Verified By PDFDumps Updated 97 Questions

NEW QUESTION # 48
In which of the following scenarios should you use self-hosted runners? (Each correct answer presents a complete solution. Choose two.)

  • A. when you want to use macOS runners
  • B. when a workflow job needs to install software from the local network
  • C. when GitHub Actions minutes must be used for the workflow runs
  • D. when the workflow jobs must be run on Windows 10
  • E. when jobs must run for longer than 6 hours

Answer: B,E

Explanation:
[B] You can use self-hosted runner to run more than 6 hours job.
Self-hosted runners give you the opportunity to persist whatever you like for your jobs and not be subject to the six-hour time-out in hosted virtual environments.
[C] Give you more control of hardware, operating system, and software tools than GitHub-hosted runners provide.
All runners can run Linux, Windows, or macOS.
Reference:
https://github.com/orgs/community/discussions/26679
https://docs.github.com/en/enterprise-cloud@latest/admin/managing-github-actions-for-your- enterprise/getting-started-with-github-actions-for-your-enterprise/getting-started-with-self-hosted- runners-for-your-enterprise
https://docs.github.com/en/enterprise-cloud@latest/actions/concepts/runners/self-hosted-runners


NEW QUESTION # 49
What are the advantages of using a matrix strategy in a job definition? (Choose two.)

  • A. It can test code in multiple operating systems.
  • B. It can run up to 512 jobs per workflow run.
  • C. It can decrease the costs for running multiple combinations of programming language/operating systems.
  • D. It can test code in multiple versions of a programming language.

Answer: A,D

Explanation:
A matrix strategy allows you to define different versions of a programming language (or any other environment setting) and run tests on each version simultaneously. This is particularly useful for testing code compatibility across different versions of a language.
A matrix strategy can also be used to test code on multiple operating systems (e.g., Windows, macOS, Linux) by defining these operating systems as matrix variables. This enables cross-platform testing within the same workflow.


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

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

Answer: B

Explanation:
Reusable workflows versus composite actions
Reusable workflows and composite actions both help you avoid duplicating workflow content.
Whereas reusable workflows allow you to reuse an entire workflow, with multiple jobs and steps, composite actions combine multiple steps that you can then run within a job step, just like any other action.
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.
Reference:
https://docs.github.com/en/actions/concepts/workflows-and-actions/reusable-workflows


NEW QUESTION # 51
How many jobs will result from the following matrix configuration?

  • A. 4 jobs
  • B. 6 jobs
  • C. 3 jobs
  • D. 5 jobs

Answer: B

Explanation:
The matrix configuration specifies two variables: color and animal. The color variable has 2 values (green and pink), and the animal variable has 2 values (owl and magpie). This would result in 4 combinations (2 color values × 2 animal values). Additionally, the include section introduces two more combinations (color: blue and animal: owl; color: pink and animal: magpie).


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

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

Answer: A,D

Explanation:
[A] 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.
[B] 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.
Note: You can use the GITHUB_TOKEN to make authenticated API calls. This example workflow creates an issue using the GitHub REST API:
Reference:
https://docs.github.com/en/actions/tutorials/authenticate-with-github_token


NEW QUESTION # 53
In which locations can actions be referenced by workflows? (Each correct answer presents a complete solution. Choose three.)

  • A. the runs-on: keyword of a workflow file
  • B. the same repository as the workflow
  • C. a published Docker container image on Docker Hub
  • D. a separate public repository
  • E. a public NPM registry
  • F. an .action extension file in the repository
  • G. the repository's Secrets settings page

Answer: C,D,E

Explanation:
Adding an action to your workflow
You can add an action to your workflow by referencing the action in your workflow file. The actions you use in your workflow can be defined in:
[F] The same repository as your workflow file
[C] Any public repository
[B] A published Docker container image on Docker Hub
Note: Adding an action from the same repository [F]
If an action is defined in the same repository where your workflow file uses the action, you can reference the action with either the {owner}/{repo}@{ref} or ./path/to/dir syntax in your workflow file.
Reference:
https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/find-and- customize-actions


NEW QUESTION # 54
In the following workflow file, line 5 interprets lines 3 and 4 as Python. Which of the following is a valid option to complete line 5?
1 steps:
2 - run: |
3 import os
4 print(os.environ['PATH'])
5

  • A. shell: python
  • B. working-directory: .github/python
  • C. with: python
  • D. shell: bash

Answer: A

Explanation:
Workflow syntax for GitHub Actions
Example: Running an inline Python script
steps:
- name: Display the path
shell: python
run: |
import os
print(os.environ['PATH'])
Reference:
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax


NEW QUESTION # 55
While awaiting approval, how many days can a workflow be in the "Waiting" state before it automatically fails?

  • A. 14 days
  • B. 7 days
  • C. 30 days
  • D. 60 days

Answer: C

Explanation:
Using required reviews in workflows
Jobs that reference an environment configured with required reviewers will wait for an approval before starting. While a job is awaiting approval, it has a status of "Waiting". If a job is not approved within 30 days, it will automatically fail.
Reference:
https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control- deployments


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

  • A. a specific step within a job, by using jobs.<job_id>.steps[*].env
  • B. the entire workflow, by using env at the top level of the workflow file
  • C. the contents of a job within a workflow, by using jobs.<job_id>.env
  • D. within the run attribute of a job step
  • E. the entire stage, by using env at the top of the defined build stage
  • F. all jobs being run on a single Actions runner, by using runner.env at the top of the workflow file

Answer: A,B,D

Explanation:
You can define environment variables for the entire workflow by using the env key at the top level of the workflow file. These environment variables will be available to all jobs and steps within the workflow.
Environment variables can also be set within the run attribute of a job step, and these variables will be scoped only to that specific step.
You can set environment variables for specific steps within a job by using jobs.<job_id>.steps[*].env, which allows you to define variables that will only be available to that step.


NEW QUESTION # 57
As a DevOps engineer, you need to define a deployment workflow that runs after the build workflow has successfully completed. Without modifying the build workflow, which trigger should you define in the deployment workflow?

  • A. workflow_dispatch
  • B. workflow_run
  • C. workflow_exec
  • D. repository_dispatch

Answer: B

Explanation:
A deployment workflow can be started after a build workflow has finished by using the workflow_run event in the deployment workflow's on trigger. You must specify the name of the build workflow you want to trigger on and use an if condition to ensure the deployment workflow only runs if the build workflow successfully completes.
Here's how to set it up:
In your deployment workflow file: (e.g., deploy.yml), define the on: trigger.
Use the workflow_run event: within the on: trigger.
Specify the build workflow: by its name.
Add a conditional if statement: to the workflow to check the conclusion of the workflow_run event, ensuring it equals 'success'.
Reference:
https://docs.github.com/actions/learn-github-actions/events-that-trigger-workflows


NEW QUESTION # 58
Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?

  • A. ENV_ACTOR
  • B. GITHUB_ACTOR
  • C. GITHUB_WORKFLOW_ACTOR
  • D. GITHUB USER

Answer: B

Explanation:
GITHUB_ACTOR : The name of the person or app that initiated the workflow.
Reference:
https://graphite.dev/guides/github-actions-variables
GITHUB_ACTOR : The name of the person or app that initiated the workflow.


NEW QUESTION # 59
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? (Choose two.)

  • A. Disable branch protections in the repository.
  • B. Use self-hosted runners for all workflow runs.
  • C. Configure the artifact and log retention period.
  • D. Configure the repo to use Git Large File Storage.
  • E. Delete artifacts from the repositories manually

Answer: C,E

Explanation:
Deleting artifacts from repositories manually will free up storage space. Artifacts are typically stored for a limited time by default, but manual cleanup can help manage space.
Configuring the artifact and log retention period allows you to control how long artifacts and logs are retained in your repository. By shortening the retention period, you can prevent unnecessary accumulation of data and manage storage more effectively.


NEW QUESTION # 60
By default, which workflows can use an action stored in internal repository? (Each answer presents a complete solution. Choose two.)

  • A. public repositories owned by the same organization as the enterprise
  • B. selected public repositories outside of the enterprise
  • C. internal repositories owned by the same organization as the enterprise
  • D. private repositories owned by an organization of the enterprise

Answer: C,D

Explanation:
Any actions or reusable workflows stored in the internal or private repository can be used in workflows defined in other internal or private repositories owned by the same organization, or by any organization owned by the enterprise.
Reference:
https://docs.github.com/actions/creating-actions/sharing-actions-and-workflows-with-your- enterprise


NEW QUESTION # 61
As a developer, you have a 10-MB data set that is required in a specific workflow. Which steps should you perform so the dataset is stored encrypted and can be decrypted during the workflow? (Choose three.)

  • A. Encrypt the dataset.
  • B. Store the dataset in a GitHub encrypted secret.
  • C. Store the encryption keys in a GitHub encrypted secret.
  • D. Leverage the actions/download-secret action in the workflow.
  • E. Commit the encrypted dataset to the same repository as the workflow
  • F. Create a GitHub encrypted secret with the Large object option selected and upload the dataset.
  • G. Compress the dataset

Answer: A,B,C

Explanation:
First, the dataset should be encrypted before being stored. This ensures that the data is protected when stored in a repository.
The encrypted dataset can be stored in a GitHub secret, ensuring it is securely kept and not exposed publicly.
The encryption key needed to decrypt the dataset should also be stored in a GitHub secret to maintain security during the workflow, allowing access only when needed.


NEW QUESTION # 62
In GitHub Actions, where should you declare custom environment variables so they are accessible across all jobs and steps in a single workflow run?

  • A. Runner command line arguments
  • B. Environment secrets
  • C. Set env in the workflow YAML
  • D. Repository variables

Answer: C

Explanation:
The correct option is Set env in the workflow YAML because defining environment variables at the top level of a workflow makes them available to every job and step in that single run.
In a workflow file you can declare a top level mapping for environment variables with key value pairs. This top level scope propagates the values to all jobs and steps in the run and you can override them at job or step scope when necessary. This is the most direct way to share non secret configuration across the entire workflow execution.


NEW QUESTION # 63
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 repositories owned by the organization
  • B. via a repository owned by a third party
  • C. via the GitHub Marketplace
  • D. via the .github repository owned by the organization

Answer: A

Explanation:
To prevent reaching the storage limit for GitHub artifacts and packages, you should manage and clean up artifacts and packages stored in repositories owned by your organization. This includes deleting unnecessary artifacts and managing the lifecycle of packages, as they contribute directly to your organization's storage quota.


NEW QUESTION # 64
In GitHub Actions, how is the success or failure of a step determined by its exit code?

  • A. Zero exit code means success and any nonzero means failure
  • B. Every exit code is a failure
  • C. Success is controlled by continue-on-error rather than the exit code
  • D. Exit codes are ignored and a maintainer sets the result manually

Answer: A

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 # 65
As a DevOps engineer, you need to execute a deployment to different environments like development and testing based on the labels added to a pull request. The deployment should use the releases branch and trigger only when there is a change in the files under 'apps' folder. Which code block should be used to define the deployment workflow trigger?

  • A. on:
    pull_request:
    types: [labeled]
    branches:
    - 'releases'
    paths:
    - 'apps/**'
  • B. on:
    pull_request:
    types: [labeled]
    branches:
    - 'releases/**'
    paths:
    - 'apps'
  • C. on:
    pull_request_review:
    types: [labeled]
    branches:
    - 'releases'
    paths:
    - 'apps/**'
  • D. on:
    pull_request_label:
    branches:
    - 'releases'
    paths:
    - 'apps/**'

Answer: A

Explanation:
Incorrect:
[Not A] pull_request activitiy type labeled not specified.
pull_request_label is not a trigger.
[Not B] Specifies branches branches that has a name that starts with releases. We are only interested in the release branch.
branches:
- 'releases/**'
[Not C]
pull_request_review
Runs your workflow when a pull request review is submitted, edited, or dismissed. A pull request review is a group of pull request review comments in addition to a body comment and a state.
Reference:
https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows


NEW QUESTION # 66
Scheduled workflows run on the:

  • A. latest commit from the branch named main,
  • B. latest commit on the default or base branch
  • C. specified commit and branch from the workflow YAML file,
  • D. latest commit from the branch named schedule,
  • E. latest commit and branch on which the workflow was triggered,

Answer: E

Explanation:
Scheduled workflows in GitHub Actions are triggered at specified times, and they run on the latest commit of the branch that triggers the workflow. This means the workflow will run on the most recent commit on the branch that was active at the time the scheduled event occurs.


NEW QUESTION # 67
You are a DevOps engineer working on custom Actions development. You need to handle the errors or exceptions as part of the JavaScript based action code. What should be added to the following code block to handle errors?
const core = require('@actions/core');
try {
// action code
} catch (error) {
<< insert snippet here >>
}

  • A. core.setFailed(error.message);
  • B. core.action.setException(error.message);
  • C. action.setError(error.message);
  • D. core.setException(error.message);

Answer: A

Explanation:
Setting a failure exit code in a JavaScript action
If you are creating a JavaScript action, you can use the actions toolkit @actions/core package to log a message and set a failure exit code. For example:
try {
// something
} catch (error) {
core.setFailed(error.message);
}
Reference:
https://docs.github.com/en/actions/how-tos/create-and-publish-actions/set-exit-codes


NEW QUESTION # 68
Which choices represent best practices for publishing actions so that they can be consumed reliably? (Each correct answer presents a complete solution. Choose two.)

  • A. commit SHA
  • B. tag
  • C. repo name
  • D. default branch
  • E. organization name

Answer: A,B

Explanation:
Security practices for writing workflows and using GitHub Actions features.
You can help mitigate this risk by following these good practices:
[B] Pin actions to a full-length commit SHA
Pinning an action to a full-length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork.
[D] Pin actions to a tag only if you trust the creator
Although pinning to a commit SHA is the most secure option, specifying a tag is more convenient and is widely used. If you'd like to specify a tag, then be sure that you trust the action's creators.
The 'Verified creator' badge on GitHub Marketplace is a useful signal, as it indicates that the action was written by a team whose identity has been verified by GitHub. Note that there is risk to this approach even if you trust the author, because a tag can be moved or deleted if a bad actor gains access to the repository storing the action.
Reference:
https://docs.github.com/en/actions/reference/security/secure-use


NEW QUESTION # 69
......

New (2026) Microsoft GH-200 Exam Dumps: https://actualtorrent.pdfdumps.com/GH-200-valid-exam.html