New BraindumpsPass GH-200 Exam Questions| Real GH-200 Dumps Updated on Aug 18, 2026
GH-200 Braindumps – GH-200 Questions to Get Better Grades
NEW QUESTION # 56
What are the two mandatory requirements for publishing GitHub Actions to the GitHub Marketplace? Each correct answer presents part of the solution.
NOTE: Each correct answer is worth one point.
- A. The name should match with one of the existing GitHub Marketplace categories.
- B. The action can be either in a public or private repository.
- C. The action's metadata file must be in the root directory of the repository.
- D. The action's name cannot match a user or organization on GitHub unless the user or organization owner is publishing the action.
- E. Each repository can contain a collection of actions as long as they are under the same Marketplace category.
Answer: C,D
Explanation:
For GitHub Marketplace publishing, the action must meet Marketplace metadata and naming requirements. Option D is correct because the repository must contain a single action metadata file, action.yml or action.yaml, at the repository root for Marketplace listing. Option B is also correct because the action name must be unique and cannot match a GitHub user or organization unless that owner is publishing the action. Option A is false because Marketplace actions must be in public repositories. Option C is incorrect because a repository is expected to contain one marketplace-listed metadata file at the root, not a collection of marketplace actions. Option E is wrong because the name must not match an existing Marketplace category. GitHub documents these Marketplace prerequisites directly.
NEW QUESTION # 57
Which action type should be used to bundle a series of run steps into a reusable custom action?
- A. JavaScript action
- B. Bash script action
- C. Docker container action
- D. Composite action
Answer: D
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 # 58
How can GitHub Actions encrypted secrets be used in if: conditionals within a workflow job?
- A. Use the secrets context within the conditional statement, e.g. ${{ secrets.MySuperSecret }}.
- B. Set the encrypted secret as a job-level environment variable and then reference the environment variable within the conditional statement.
- C. Create a job dependency that exposes the encrypted secret as a job output, which can then be leveraged in a subsequent dependent job.
- D. Use a workflow command to expose the encrypted secret via a step's output parameter and then use the step output in the job's if: conditional.
Answer: A
Explanation:
GitHub Actions encrypted secrets can be accessed in workflows using the secrets context. You can directly reference the secret within an if: conditional using ${{ secrets.MySuperSecret }} to determine whether a job or step should run based on the secret's value.
NEW QUESTION # 59
You are a DevOps engineer working on a custom action. You want to conditionally run a script at the start of the action, before the main entrypoint. Which code block should be used to define the metadata file for your custom action?
- A. runs:
using: 'nodel6'
before: 'start.js'
before-if: github.event_name == 'push'
main: 'index.js' - B. runs:
using: 'nodel6'
pre-if: github.event_name == 'push' then 'start.js'
main: 'index.js' - C. runs:
using: 'nodel6'
start: 'start.js'
start-if: github.event_name == 'push'
main: 'index.js' - D. runs:
using: 'nodel6'
pre: 'start.js'
pre-if: github.event_name == 'push'
main: 'index.js'
Answer: D
Explanation:
The pre: line before the pre-if: line.
Note: runs.pre-if
Optional
Allows you to define conditions for the pre: action execution. The pre: action will only run if the conditions in pre-if are met. If not set, then pre-if defaults to always(). In pre-if, status check functions evaluate against the job's status, not the action's own status.
Note that the step context is unavailable, as no steps have run yet.
In this example, cleanup.js only runs on Linux-based runners:
pre: 'cleanup.js'
pre-if: runner.os == 'linux'
Reference:
https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax
NEW QUESTION # 60
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: A
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 # 61
You are a DevOps engineer working on deployment workflows. You need to execute the deploy job only if the current branch name is feature-branch. Which code snippet will help you to implement the conditional execution of the job?
- A. jobs:
deploy:
if: github.ref_name == ' feature-branch '
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 - B. jobs:
deploy:
if: github.ref.name == ' feature-branch '
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 - C. jobs:
deploy:
if: github.branch.name == ' feature-branch '
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 - D. jobs:
deploy:
if: github.branch_name == ' feature-branch '
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Answer: A
Explanation:
The correct GitHub Actions context property for the short branch or tag name that triggered the workflow is github.ref_name. A job-level if: condition can use this context to control whether the job runs. Therefore, if:
github.ref_name == ' feature-branch ' correctly limits the deploy job to the feature-branch branch. The other options use invalid context paths such as github.ref.name, github.branch_name, and github.branch.name; these are not recognized GitHub Actions properties. In exam terms, this question validates knowledge of workflow expressions, GitHub context variables, and conditional job execution. The important distinction is that github.ref contains the full ref path, while github.ref_name provides the branch or tag name directly.
NEW QUESTION # 62
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. Use a marketplace action to conditionally parse the DEPLOY_KEY repository secret based on the cloud resource name.
- 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. 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.
- D. Create repository secrets named DevCloud.DEPLOY_KEY and TestCloud.DEPLOY_KEY so that the reusable workflow parses the secrets by resource name.
Answer: C
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 # 63
You need to publish a release that includes assets in GitHub Actions. The solution must meet GitHub support requirements. What should you do?
- A. Run gh release create in a script step to create a release and attach the assets after tagging a commit.
- B. Run git push --tags to automatically trigger GitHub to create a release that includes all the project files.
- C. Use a GitHub Marketplace action that creates a release and uploads the assets in a single step.
- D. Run actions/upload-artifact followed by actions/create-release, and then actions/upload-release- asset.
Answer: A
Explanation:
To publish a release and attach assets using the GitHub CLI (gh) within a GitHub Actions script, you can use the gh release create command. This approach is often preferred over third-party actions because the CLI is pre-installed on GitHub-hosted runners.
Core Command Syntax
The basic syntax to create a release and attach files simultaneously is:
gh release create <tag> [<files>...] [flags]
Note:
Implementation in GitHub Actions
To use this in a workflow, ensure your job has contents: write permissions and that you provide the GH_TOKEN environment variable so the CLI can authenticate.
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# (Optional) Build your assets here (e.g., zip, tar.gz, or binaries)
- name: Create Release and Upload Assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v1.0.0 ./dist/my-asset.zip --title "v1.0.0" --notes "Release notes here" Reference:
https://michael-mckenna.com/how-to-upload-file-to-github-release-in-a-workflow
NEW QUESTION # 64
What is a role of GitHub Marketplace when using GitHub Actions?
- A. GitHub Marketplace restricts the use of third-party actions to only public repositories.
- B. GitHub Marketplace allows a user to deploy GitHub Actions workflows to any repository automatically without requiring permissions.
- C. GitHub Marketplace serves only as a billing dashboard for tracking paid actions.
- D. GitHub Marketplace provides a centralized location to discover, share, and publish reusable GitHub Actions workflows created by the community or vendors.
Answer: D
Explanation:
GitHub Marketplace is used to discover, share, and publish reusable automation, including GitHub Actions created by GitHub, vendors, and the community. Option C best describes this role.
Marketplace does not exist only for billing, so option B is too narrow and incorrect. Option A is also wrong because Marketplace does not merely restrict third-party actions to public repositories; action usage is governed by repository, organization, or enterprise Actions policies. Option D is false because Marketplace does not bypass repository permissions or automatically deploy workflows into repositories. In exam terms, Marketplace is part of the automation reuse and action discovery domain:
developers use it to find trusted or verified actions rather than building every integration manually.
GitHub documents Marketplace as a place to publish and share actions with the community.
NEW QUESTION # 65
In GitHub Enterprise Cloud, where do you set the policy that allows only enterprise hosted actions and reusable workflows to run?
- A. Enterprise account Actions policy
- B. Organization settings Policies then Actions
- C. Repository settings Actions general
Answer: A
Explanation:
The enterprise Actions policy is the centralized place where enterprise owners enforce which actions and reusable workflows are permitted across all organizations in GitHub Enterprise Cloud. From this scope you can require that only actions and reusable workflows hosted within the enterprise are allowed to run, and this policy flows down to organizations and repositories to ensure consistent enforcement.
NEW QUESTION # 66
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.)
- A. Configure the repo to use Git Large File Storage.
- B. Use self-hosted runners for all workflow runs.
- C. Configure the artifact and log retention period.
- D. Delete artifacts from the repositories manually.
- E. Disable branch protections in the repository.
Answer: C,D
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 # 67
Without the need to use additional infrastructure, what is the simplest and most maintainable method for configuring a workflow job to provide access to an empty PostgreSQL database?
- A. Run the actions/postgres action in a parallel job.
- B. Use service containers with a Postgres database from Docker hub.
- C. Dynamically provision and deprovision an environment.
- D. It is currently impossible to access the database with GitHub Actions.
Answer: B
Explanation:
GitHub Actions supports the use of service containers, which allows you to spin up a PostgreSQL database (or any other service) in a Docker container during your workflow. You can pull a PostgreSQL image from Docker Hub, and the container will automatically be available to your workflow job. This method requires no additional infrastructure and is easy to configure and maintain, as you simply define the container in the workflow file.
NEW QUESTION # 68
As a developer, what options should you recommend to implement standards for automation reuse? (Choose two.)
- A. Create reusable actions and workflows that can be called from other workflows.
- B. Create workflow templates and store them in the organization's .github repository.
- C. Create a marketplace partition to publish reusable automation for the company.
- D. Store shared corporate actions in subfolders in a defined and documented internally accessible repository.
Answer: A,B
Explanation:
Creating workflow templates in the organization's .github repository allows the organization to standardize workflows and make them easily reusable across multiple repositories. This ensures consistency and simplifies maintenance.
Creating reusable actions and workflows that can be called from other workflows helps modularize and standardize automation tasks. These reusable components can be maintained centrally and called from different workflows across repositories.
NEW QUESTION # 69
What is the right method to ensure users approve a workflow before the next step proceeds?
- A. granting users workflow approval permissions
- B. granting users repository approval permissions
- C. adding users as required reviewers for an environment
- D. creating a branch protection rule and only allow certain users access
Answer: C
Explanation:
GitHub Actions allows you to configure environment protection rules, where you can require specific users or teams to approve the deployment before the workflow proceeds to the next step. This ensures that the required reviewers approve the workflow before any sensitive actions (such as deployment) occur.
NEW QUESTION # 70
As a DevOps engineer, you are developing a container action. You need to execute a cleanup script after completing the main script execution. Which code block should be used to define the cleanup script?
- A.

- B.

- C.

- D.

Answer: A
Explanation:
The correct syntax for specifying a cleanup script to be run after the main entry point is executed in a Docker- based GitHub Action is to use the post key. This ensures that cleanup.sh runs after the main script ( main.sh ) has completed.
NEW QUESTION # 71
Which workflow commands send information from the runner? (Choose two.)
- A. setting output parameters
- B. reading from environment variables
- C. setting a debug message
- D. populating variables in a Dockerfile
Answer: A,C
Explanation:
Setting a debug message using ::debug:: command sends a message to the logs, helping with troubleshooting and providing insight into the workflow run.
Setting output parameters using ::set-output sends data from a job step to subsequent steps or jobs, which can be used later in the workflow.
NEW QUESTION # 72
......
GH-200 Exam Dumps - Try Best GH-200 Exam Questions: https://www.braindumpspass.com/Microsoft/GH-200-practice-exam-dumps.html
Get New GH-200 Certification – Valid Exam Dumps Questions: https://drive.google.com/open?id=1FqDGZ4V8cIfu1TxhlM8sGQkWwALTc3um