Free GH-200 Exam Braindumps
GitHub Actions Questions 51–55 (page: 12)

Updated On: 16-Nov-2026

What is the most suitable action type for a custom action written in TypeScript?

  1. Docker container action
  2. Bash script action
  3. composite run step
  4. JavaScript action

Answer(s): D

Explanation:

Example: Build your custom GitHub Action
To build your action, run npm run bundle. This will compile the TypeScript code in the src/ directory and output the JavaScript code in the dist/ directory. The exact command for bundle is defined in the package.json file.
Note: About custom actions
Actions are individual tasks that you can combine to create jobs and customize your workflow. Y
Types of action
You can build Docker container, JavaScript, and composite actions.


Reference:

https://victoronsoftware.com/posts/typescript-github-action/
https://docs.github.com/en/actions/concepts/workflows-and-actions/custom-actions



As a developer, you need to make sure that only actions from trusted sources are available for use in your GitHub Enterprise Cloud organization.
Which of the following statements are true? (Each correct answer presents a complete solution. Choose three.)

  1. Actions can be published to an internal marketplace.
  2. GitHub-verified actions can be collectively enabled for use in the enterprise.
  3. Specific actions can individually be enabled for the organization, including version information.
  4. Actions can be restricted to only those available in the enterprise.
  5. Individual third-party actions enabled with a specific tag will prevent updated versions of the action from introducing vulnerabilities.
  6. Actions created by GitHub are automatically enabled and cannot be disabled.

Answer(s): A,B,C

Explanation:

[A] Internal Actions Marketplace
The reason for having an internal actions marketplace is to have a central location for all the actions that can be used inside our production organization. This is to prevent any actions from the public marketplace from being used in our production organization, without being checked for security risks first.
[B] Allow Marketplace actions by verified creators: You can allow all GitHub Marketplace actions created by verified creators to be used by workflows.
When GitHub has verified the creator of the action as a partner organization, the badge is displayed next to the action in GitHub Marketplace.
[C] You can enable specific actions for the organization by identifying them and providing version control, ensuring only trusted versions are used in workflows.
Incorrect:
[Not F] Disabling or limiting GitHub Actions for your organization
You can enable, disable, and limit GitHub Actions for an organization.


Reference:

https://devopsjournal.io/blog/2021/10/14/GitHub-Actions-Internal-Marketplace https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-organization-settings/disabling-or-l imiting-github-actions-for-your-organization



Which of the following is the best way for an enterprise to prevent certain marketplace actions from running?

  1. Create a list of the actions that are restricted from being used as an enterprise policy. Every other action can be run.
  2. It is not possible; if an action is in the marketplace, its use cannot be restricted.
  3. Create a list that is maintained as a . yml file in a . github repository specified in the enterprise. Only these actions can be run.
  4. Create a list of the actions that are allowed to run as an enterprise policy. Only these actions can be run.

Answer(s): 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.
Note: To allow a specific list of actions at the GitHub Enterprise level, an administrator must navigate to Enterprise > Policies > Actions and select "Allow select actions". Then, from the dropdown menus, they choose "Allow selected actions and reusable workflows" and add the desired actions to the allowed list using the format OWNER/REPOSITORY@TAG-OR-SHA. These actions can also include local actions, actions from specific organizations, or specific tags or commit SHAs.


Reference:

https://docs.github.com/en/enterprise-cloud@latest/admin/enforcing-policies/enforcing-policies-for-your-enterpr ise/enforcing-policies-for-github-actions-in-your-enterprise



Which files are required for a Docker container action in addition to the source code? (Each correct answer presents a partial solution. Choose two.)

  1. action.yml
  2. Actionfile
  3. metadata.yml
  4. Dockerfile

Answer(s): A,D

Explanation:

Creating a Docker container action
Create a dockerfile
Dockerfile support for GitHub Actions
When creating a Dockerfile for a Docker container action, you should be aware of how some Docker instructions interact with GitHub Actions and an action's metadata file.
Creating an action metadata file
Create a new action.yml file.


Reference:

https://docs.github.com/en/actions/tutorials/use-containerized-services/create-a-docker-container-action https://docs.github.com/en/actions/reference/workflows-and-actions/dockerfile-support



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?





Answer(s): A

Explanation:

Use keywords strategy and matrix in that order.
Last line should be node-version: ${{ matrix.node-ver}}
Incorrect:
[Not B]
Use keywords matrix and strategy separately, not matrix-strategy.
[Not C] Wrong order of keywords strategy and matrix.
[Not D] Last line should be node-version: ${{ matrix.node-ver}} not ${{ strategy.node-ver}}
Note: Running variations of jobs in a workflow
Create a matrix to define variations for each job.
A matrix strategy lets you use variables in a single job definition to automatically create multiple job runs that are based on the combinations
Adding a matrix strategy to your workflow job
Use jobs.<job_id>.strategy.matrix to define a matrix of different job configurations. Within your matrix, define one or more variables followed by an array of values. For example, the following matrix has a variable called version with the value [10, 12, 14] and a variable called os with the value [ubuntu-latest, windows-latest]:
jobs:
example_matrix:
strategy:
matrix:
version: [10, 12, 14]
os: [ubuntu-latest, windows-latest]
Using contexts to create matrices
To create matrices with information about workflow runs, variables, runner environments, jobs, and steps, access contexts using the ${{ <context> }} expression syntax.
{
"event_type": "test",
"client_payload": {
"versions": [12, 14, 16]
}
}
on:
repository_dispatch:
types:
- test jobs:
example_matrix:
runs-on: ubuntu-latest strategy:
matrix:
version: ${{ github.event.client_payload.versions }}
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}


Reference:

https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations



Viewing page 12 of 28
Viewing questions 56 - 60 out of 134 questions


Post your Comments and Discuss Microsoft GH-200 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!