Valid GH-200 Dumps shared by PassLeader for Helping Passing GH-200 Exam! PassLeader now offer the newest GH-200 VCE dumps and GH-200 PDF dumps, the PassLeader GH-200 exam questions have been updated and ANSWERS have been corrected, get the newest PassLeader GH-200 dumps with VCE and PDF here: https://www.passleader.com/gh-200.html (75 Q&As Dumps)
BTW, DOWNLOAD part of PassLeader GH-200 dumps from Cloud Storage: https://drive.google.com/drive/folders/1oSrRkZbcrPrPBV7eG7RGeIRyHe6cvaCC
NEW QUESTION 1
When reviewing an action for use, what file defines its available inputs and outputs?
A. inputs.yml
B. config.json
C. defaults.json
D. workflow.yml
E. action.yml
Answer: E
Explanation:
The action.yml file defines the inputs and outputs for a GitHub Action. This file contains metadata about the action, including the required inputs and outputs, as well as other configurations like the action’s description, runs, and environment setup.
NEW QUESTION 2
Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?
A. ENV_ACTOR
B. GITHUB_WORKFLOW_ACTOR
C. GITHUB_ACTOR
D. GITHUB_USER
Answer: C
Explanation:
The GITHUB_ACTOR environment variable indicates the name of the person or app that initiated the workflow. This variable is automatically provided by GitHub in the workflow and can be used to identify the user or application triggering the workflow.
NEW QUESTION 3
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.)
A. The self-hosted runner is running a Linux operating system.
B. The self-hosted runner is running a Windows operating system.
C. Docker is installed on the self-hosted runner.
D. Kubernetes is installed on the self-hosted runner.
E. The service status of Kubernetes is “active”.
Answer: AC
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.
NEW QUESTION 4
Which choices represent best practices for publishing actions so that they can be consumed reliably? (Choose two.)
A. repo name
B. tag
C. commit SHA
D. organization name
E. default branch
Answer: BC
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.
NEW QUESTION 5
GitHub-hosted runners support which capabilities? (Choose two.)
A. automatic patching of both the runner and the underlying OS
B. automatic file-system caching between workflow runs
C. support for Linux, Windows, and mac
D. support for a variety of Linux variations including CentOS, Fedora, and Debian
E. requiring a payment mechanism (e.g., credit card) to use for private repositories
Answer: CD
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.
NEW QUESTION 6
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 artifacts when referencing files produced by a job after a workflow has ended.
C. Use caching to store cache entries for up to 30 days between accesses.
D. Use artifacts to access the GitHub Package Registry and download a package for a workflow.
Answer: AB
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 7
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. It is not possible; if an action is in the marketplace, its use cannot be restricted.
C. Create a list that is maintained as a .yml file in a .github repository specified in the enterprise.
Only these actions can be run.
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 8
What are the two ways to pass data between jobs? (Choose two.)
A. Use the copy action with restore parameter to restore the data from the cache.
B. Use the copy action to save the data that should be passed in the artifacts folder.
C. Use the copy action with cache parameter to cache the data.
D. Use data storage.
E. Use job outputs.
F. Use artifact storage.
Answer: EF
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 an ${{ 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 9
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. actions stored m private repositories in the organization
C. encrypted secrets
D. custom Docker actions stored in GitHub Container Registry
E. actions stored in an organizational partition in the GitHub Marketplace
F. workflow templates
Answer: BCF
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 10
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. Actions –> Load workflow
B. Workflow –> New workflow
C. Workflow –> Load 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 11
What are the two types of environment protection rules you can configure? (Choose two.)
A. required reviewers
B. branch protections
C. wait timer
D. artifact storage
Answer: AC
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 12
As a developer, you want to review the step that caused a workflow failure and the failed step’s build logs. First navigate to the main page of the repository on GitHub. Which section contains the step failure information?
A. Insights.
B. Code.
C. Actions.
D. Pull requests.
E. Issues.
Answer: C
Explanation:
The Actions tab on the main page of the repository is where you can find detailed information about the workflow runs, including step failures and build logs. You can review the status of each job and step within the workflow, see the failure messages, and access logs for debugging.
NEW QUESTION 13
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. making an authenticated GitHub API request
C. checking out source code with the actions/checkout@v3 action
D. assigning non-default permissions to the GITHUB_TOKEN
Answer: AB
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 14
As a developer, you need to integrate a GitHub Actions workflow with a third-party code quality provider that uses the Checks API. How should you trigger a follow-up workflow?
A. Add the workflow_run webhook event as a trigger for the workflow for the code quality integration name.
B. Add the check_run webhook event as a trigger for the workflow when the code quality integration is completed.
C. Add the pull_request webhook event as a trigger for the workflow when the code quality integration is synchronized.
D. Add the deployment webhook event as a trigger for the workflow when the code quality integration is completed.
Answer: B
Explanation:
The check_run event is triggered when a check (such as a code quality check) completes, including when the status of a check changes. By adding this event as a trigger, you can initiate a follow-up workflow when the code quality integration finishes its checks.
NEW QUESTION 15
What metadata file in a custom action defines the main entry point?
A. action.js
B. index.js
C. action.yml
D. main.yml
Answer: C
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 16
Which of the following statements are true regarding the use of GitHub Actions on a GitHub Enterprise Server instance? (Choose three.)
A. Use of GitHub Actions on GitHub Enterprise Server requires a persistent internet connection.
B. Actions created by GitHub are automatically available and cannot be disabled.
C. Most GitHub authored actions are automatically bundled for use on GitHub Enterprise Server.
D. Third party actions can be used on GitHub Enterprise Server by configuring GitHub Connect.
E. Actions must be defined in the .github repository.
F. Third party actions can be manually synchronized for use on GitHub Enterprise Server.
Answer: ADF
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 17
You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?
A. check_suite
B. workflow_run
C. deployment
D. repository_dispatch
Answer: D
Explanation:
The repository_dispatch event allows you to trigger a workflow in response to external activity. It is commonly used when you need to trigger a workflow from outside GitHub, such as from another system or service, by sending a request to the GitHub API. This event provides flexibility to integrate with various external systems and trigger workflows in a GitHub repository.
NEW QUESTION 18
Which scopes are available to define custom environment variables within a workflow file? (Choose three.)
A. the entire workflow, by using env at the top level of the workflow file
B. all jobs being run on a single Actions runner, by using runner.env at the top of the workflow file
C. the entire stage, by using env at the top of the defined build stage
D. within the run attribute of a job step
E. the contents of a job within a workflow, by using jobs.<job_id>.env
F. a specific step within a job, by using jobs.<job_id>.steps[*].env
Answer: ADF
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 19
Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. In which scenarios would temporarily disabling a workflow be most useful? (Choose two.)
A. A workflow sends requests to a service that is down.
B. A workflow error produces too many, or wrong, requests, impacting external services negatively.
C. A workflow is configured to run on self-hosted runners.
D. A workflow needs to be changed from running on a schedule to a manual trigger.
E. A runner needs to have diagnostic logging enabled.
Answer: AB
Explanation:
– If a workflow depends on an external service that is down, disabling the workflow temporarily will prevent it from running and sending requests to the service, thus avoiding failed requests or unnecessary retries.
– If a workflow is causing a negative impact on external services by generating too many requests or incorrect data due to a bug, temporarily disabling the workflow will stop this behavior while the issue is fixed.
NEW QUESTION 20
Which default environment variable specifies the branch or tag that triggered a workflow?
A. GITHUB_TAG
B. GITHUB_REF
C. ENV_BRANCH
D. GITHUB_BRANCH
Answer: B
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 21
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? (Choose two.)
A. dependency: the name and version of a package to cache or restore
B. key: the key created when saving a cache and the key used to search for a cache
C. cache-hit: the copy action key used with restore parameter to restore the data from the cache
D. path: the file path on the runner to cache or restore
E. ref: the ref name of the branch to access and restore a cache created
F. restore-keys: the copy action key used with cache parameter to cache the data
Answer: BD
Explanation:
– The key is required because it uniquely identifies the cache. It is used to store and retrieve cached data. When creating or restoring a cache, you need to define a key that will be used to identify the cache.
– The path is the file path on the runner that you want to cache. This is where the cached files or dependencies are located and should be specified to tell GitHub where to store or retrieve the cache from.
NEW QUESTION 22
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:
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 23
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. Delete artifacts from the repositories manually.
B. Disable branch protections in the repository.
C. Use self-hosted runners for all workflow runs.
D. Configure the artifact and log retention period.
E. Configure the repo to use Git Large File Storage.
Answer: AD
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 24
As a developer, how can you identify a Docker container action on GitHub?
A. The action’s repository includes @actions/core in the root directory.
B. The action’s repository name includes the keyword “Docker”.
C. The action.yml metadata file references a Dockerfile file.
D. The action.yml metadata file has the runs.using value set to Docker.
Answer: D
Explanation:
In a Docker container action, the action.yml file includes the runs.using field, which is set to docker to specify that the action runs inside a Docker container. This is the key indicator that the action is a Docker container action.
NEW QUESTION 25
As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?
A. core.info(‘Something went wrong, but it\’s not bad enough to fail the build.’)
B. core.notice(‘Something went wrong, but it\’s not bad enough to fail the build.’)
C. core.warning(‘Something went wrong, but it\’s not bad enough to fail the build.’)
D. core.warn(‘Something went wrong, but it\’s not bad enough to fail the build.’)
Answer: C
Explanation:
The core.warning() function from the @actions/core package is used to create a warning message in the workflow logs. This is an annotation type that informs users about issues that don’t require failing the build but still need attention.
NEW QUESTION 26
……
Get the newest PassLeader GH-200 VCE dumps here: https://www.passleader.com/gh-200.html (75 Q&As Dumps)
And, DOWNLOAD the newest PassLeader GH-200 PDF dumps from Cloud Storage for free: https://drive.google.com/drive/folders/1oSrRkZbcrPrPBV7eG7RGeIRyHe6cvaCC