Free GH-200 pdf Files With Updated and Accurate Dumps Training [Q10-Q28]

Share

Free GH-200 pdf Files With Updated and Accurate Dumps Training

Top-Class GH-200 Question Answers Study Guide


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.

 

NEW QUESTION # 10
What will the output be for the following event trigger block in a workflow?

  • A. It runs the workflow when an issue or issue comment in the workflow ' s repository is created or modified.
  • B. It runs the workflow when an issue is edited or when an issue comment created.
  • C. It runs the workflow when an issue is created or edited, or when an issue or pull request comment is created.
  • D. It throws a workflow syntax error, pointing to the types definition in issue_comment event.
  • E. It throws a workflow syntax error, pointing to the types definition in issues event.

Answer: B

Explanation:
The provided event trigger block specifies two types of events:
For issues: the workflow triggers on opened or edited issues.
For issue_comment: the workflow triggers when an issue comment is created.
This configuration ensures the workflow will run when either an issue is opened or edited, or an issue comment is created.


NEW QUESTION # 11
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? (Each correct answer presents a complete solution. Choose two.)

Answer:

Explanation:
B.C
Explanation:
[E] To bypass GitHub's limit of 100 MB you can use Git Large File Storage (Git LFS). It stores references to your file in the repo by creating a pointer file. However, the actual file is going to be stored at a different location.
[C] Configuring the retention period for GitHub Actions artifacts and logs in your organization You can configure the retention period for GitHub Actions artifacts and logs in your organization.
By default, the artifacts and log files generated by workflows are retained for 90 days before they are automatically deleted. You can adjust the retention period, depending on the type of repository:
For public repositories: you can change this retention period to anywhere between 1 day or 90 days.
For private repositories: you can change this retention period to anywhere between 1 day or 400 days.
When you customize the retention period, it only applies to new artifacts and log files, and does not retroactively apply to existing objects. For managed repositories and organizations, the maximum retention period cannot exceed the limit set by the managing organization or enterprise.
Reference:
https://gitprotect.io/blog/github-storage-limits/
https://docs.github.com/en/organizations/managing-organization-settings/configuring-the- retention-period-for-github-actions-artifacts-and-logs-in-your-organization


NEW QUESTION # 12
GitHub-hosted runners support which capabilities? (Each correct answer presents a complete solution. Choose two.)

  • A. automatic patching of both the runner and the underlying OS
  • B. support for Linux, Windows, and macOS
  • C. requiring a payment mechanism (e.g., credit card) to use for private repositories
  • D. automatic file-system caching between workflow runs
  • E. support for a variety of Linux variations including CentOS, Fedora, and Debian

Answer: A,B

Explanation:
[A, not B] Each GitHub-hosted runner is a new virtual machine (VM) hosted by GitHub with the runner application and other tools preinstalled, and is available with Ubuntu Linux, Windows, or macOS operating systems.
[E] When you use a GitHub-hosted runner, machine maintenance and upgrades are taken care of for you.
Reference:
https://docs.github.com/en/[email protected]/actions/concepts/runners/github-hosted- runners


NEW QUESTION # 13
Which of the following is the proper syntax to specify a custom environment variable named MY_VARIABLE with the value my-value?

  • A. environment:
    MY_VARIABLE: my-value
  • B. env:
    MY_VARIABLE = my-value
  • C. var:
    MY_VARIABLE: my-value
  • D. var:
    MY_VARIABLE = my-value
  • E. environment:
    MY_VARIABLE = my-value
  • F. env:
    MY_VARIABLE: my-value

Answer: F

Explanation:
To set a custom environment variable for a single workflow, you can define it using the env key in the workflow file.
Example:
env:
DAY_OF_WEEK: Monday
Note: 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 # 14
Which default GitHub environment variable indicates the owner and repository name?

  • A. GITHUB WORKFLOW REPO
  • B. REPOSITORY NAME
  • C. ENV REPOSITORY
  • D. GITHUB REPOSITORY

Answer: B

Explanation:
The GITHUB_REPOSITORY environment variable contains the owner and repository name in the format owner/repository. It is automatically provided by GitHub Actions and can be used to reference the repository in workflows.


NEW QUESTION # 15
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.job
  • B. github.event
  • C. github.event_path
  • D. github.repository

Answer: B

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 # 16
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. with: python
  • B. working-directory: .github/python
  • C. shell: bash
  • D. shell: python

Answer: D

Explanation:
The run keyword executes commands using the default shell unless a different shell is specified. Since the commands shown are Python statements, the step must define shell: python so GitHub Actions interprets the script using Python instead of Bash, PowerShell, or another default shell. Option D is therefore correct.
Option A is invalid because with: is used to pass inputs to actions, not to define the interpreter for a run command. Option B would execute the text as Bash and fail because import os is not Bash syntax. Option C only changes the working directory and does not change the shell. This exam topic checks workflow syntax, shell selection, and step-level command execution.


NEW QUESTION # 17
Scheduled workflows run on the:

  • A. specified commit and branch from the workflow YAML file,
  • B. latest commit from the branch named main,
  • C. latest commit from the branch named schedule,
  • D. latest commit on the default or base branch
  • 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 # 18
You are a developer working on developing reusable workflows for your organization. What keyword should be included as part of the reusable workflow event triggers?

  • A. check_run
  • B. pull_request
  • C. workflow_run
  • D. workflow_call

Answer: D

Explanation:
To make a GitHub Actions workflow reusable, you must include the workflow_call keyword under the on key.
This specific event trigger allows the workflow to be called by other "caller" workflows rather than only triggering on standard events like a code push or pull request.
Reusable Workflow Syntax
A basic reusable workflow structure using the workflow_call trigger typically looks like this:
on:
workflow_call:
inputs:
# Optional: Define inputs to be passed from the caller
username:
required: true
type: string
secrets:
# Optional: Define secrets to be passed from the caller
env_token:
required: true
Key Components of workflow_call
inputs: Used to define non-sensitive data (strings, numbers, or booleans) that the caller workflow must or can provide.
secrets: Used to define sensitive data that the caller must pass to the reusable workflow.
outputs: Used to map data from jobs within the reusable workflow so they can be used by the caller workflow.
Reference:
https://www.incredibuild.com/blog/best-practices-to-create-reusable-workflows-on-github-actions


NEW QUESTION # 19
Which of the following is the lowest repository permission you need to have for downloading workflow artifacts?

  • A. Write
  • B. Maintain
  • C. Read
  • D. Triage
  • E. Admin

Answer: C

Explanation:
Downloading workflow artifacts
You can download archived artifacts before they automatically expire.
Who can use this feature?
People who are signed into GitHub and have read access to a repository can download workflow artifacts.
Reference:
https://docs.github.com/en/actions/how-tos/manage-workflow-runs/download-workflow-artifacts


NEW QUESTION # 20
Which repository files are required for a Docker container action and for a JavaScript action to run correctly? (Choose 3)

  • A. package.json
  • B. JavaScript entry file such as main.js or index.js
  • C. Container action Dockerfile
  • D. Action metadata file action.yml or action.yaml

Answer: B,C,D

Explanation:
The correct options are JavaScript entry file such as main.js or index.js, Action metadata file action.yml or action.yaml, and Container action Dockerfile.
The Action metadata file action.yml or action.yaml is mandatory because it declares inputs and outputs and it instructs GitHub how to run the action. Both JavaScript and container actions rely on this metadata to execute correctly.
For a JavaScript action the JavaScript entry file such as main.js or index.js is the script that the runner executes as directed by the metadata. GitHub expects a committed distributable script, so the entry file must be present in the repository.
For a container action the Container action Dockerfile defines how to build the image and what command to run, which makes the Dockerfile required for the action to work.


NEW QUESTION # 21
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. POST /repos/:owner/:repo/actions/runs/:run_id/logs
  • B. GET /repos/:owner/:repo/actions/runs/:run_id/logs
  • C. POST /repos/:owner/:repo/actions/runs/:run_id
  • D. GET /repos/:owner/:repo/actions/artifacts/logs

Answer: B

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 # 22
A single secret must be accessed by workflows in specific repositories. What is the best way to create the secret?

  • A. Store the secret in a supported external key vault. Configure OpenID Connect (OIDC) to allow access to the external vault and link the secret from the external key vault in each of the specific repositories.
  • B. Create an environment secret at the organization level and leverage that environment in each of the specified repositories.
  • C. Create an organization secret, specify Selected repositories as the Repository access, and select the required repositories.
  • D. Create the secret in one of the repositories, check the Share secret option, and select the required repositories.

Answer: C

Explanation:
Creating secrets for an organization
When creating a secret or variable in an organization, you can use a policy to limit access by repository. For example, you can grant access to all repositories, or limit access to only private repositories or a specified list of repositories.
To specify that the secret should be available to selected repositories within the organization, use the --repos or -r flag.
gh secret set --org ORG_NAME SECRET_NAME --repos REPO-NAME-1, REPO-NAME-2 Note: REST API endpoints for GitHub Actions Secrets Use the REST API to interact with secrets in GitHub Actions.
* Set selected repositories for an organization secret
Replaces all repositories for an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret.
Request example
Put /orgs/{org}/actions/secrets/{secret_name}/repositories
Reference:
https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use- secrets
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#set-selected- repositories-for-an-organization-secret


NEW QUESTION # 23
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.

Answer: B

Explanation:
The best approach is to use a service container for Redis. Service containers provide temporary supporting services for a workflow job, such as databases, caches, and message brokers, without permanently changing the runner. This is exactly what is needed when Redis is required only during workflow execution and should not affect future jobs on the self-hosted Linux runner. Option A installs Redis directly during the job and can introduce dependency, cleanup, and configuration risk. Option C requires separate infrastructure, which is unnecessary. Option D is incorrect because installing Redis into the runner image makes the runner stateful and harder to maintain. GitHub Actions workflow syntax supports jobs. < job_id > .services for service containers.


NEW QUESTION # 24
You have exactly one Windows x64 self-hosted runner, and it is configured with custom tools.
Which syntax could you use in the workflow to target that runner?

  • A. runs-on: windows-latest
  • B. runs-on: [self-hosted, windows, x64]
  • C. self-hosted: [windows-x64]
  • D. self-hosted: [windows, x64]

Answer: B

Explanation:
Using self-hosted runners in a workflow
To use self-hosted runners in a workflow, you can use labels or groups to specify the runner for a job.
Using default labels to route jobs
A self-hosted runner automatically receives certain labels when it is added to GitHub Actions.
These are used to indicate its operating system and hardware platform:
self-hosted: Default label applied to self-hosted runners.
linux, windows, or macOS: Applied depending on operating system.
x64, ARM, or ARM64: Applied depending on hardware architecture.
You can use your workflow's YAML to send jobs to a combination of these labels. In this example, a self-hosted runner that matches all three labels will be eligible to run the job:
runs-on: [self-hosted, linux, ARM64]
self-hosted - Run this job on a self-hosted runner.
linux - Only use a Linux-based runner.
ARM64 - Only use a runner based on ARM64 hardware.
Reference:
https://docs.github.com/en/actions/how-tos/manage-runners/self-hosted-runners/use-in-a- workflow


NEW QUESTION # 25
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. enable debug logging
  • B. environment variables
  • 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 # 26
As a developer, how can you identify a composite action on GitHub?

  • A. The action's repository name includes the keyword "composite."
  • B. The action's repository includes an init.sh file in the root directory.
  • C. The action's repository includes Dockerfile and package.json files.
  • D. The action.yml metadata file has the runs.using value set to composite.

Answer: D

Explanation:
A composite action is identified by its action metadata file. In action.yml or action.yaml, the runs section must define using: " composite " . This tells GitHub Actions that the action is a composite action made from one or more reusable workflow steps. Option A is incorrect because Dockerfile and package.json files do not identify a composite action; they are usually associated with Docker or JavaScript-based projects. Option C is wrong because repository naming has no technical meaning in action classification. Option D is also wrong because an init.sh file is merely a script and does not define the action type. GitHub's metadata syntax states that composite actions require runs.using to be set to composite.


NEW QUESTION # 27
In which locations can actions be referenced by workflows? (Choose three.)

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

Answer: D,E,G

Explanation:
Actions can be stored in a separate public repository and referenced in workflows by specifying the repository and action name.
Actions can also be stored in the same repository as the workflow and referenced directly by their path (e.g., ./.
github/actions/my-action).
Actions can be packaged as Docker container images and published to Docker Hub. These can then be referenced in workflows by specifying the Docker image.


NEW QUESTION # 28
......

Real Updated GH-200 Questions & Answers Pass Your Exam Easily: https://www.dumpstorrent.com/GH-200-exam-dumps-torrent.html

Easily To Pass New GH-200 Verified & Correct Answers: https://drive.google.com/open?id=10w2iW2qNI9T9lqODlsPbQpCGoBXz04SR