OpenExamsFREE PRACTICE — ANY EXAM

Free Exam GH-200: GitHub Actions Practice Questions

100 free questions · Answer explanations · No signup required

View examination details, outline and sources

Loading selected examination banks…

Sample Practice Questions

Try these 10 sample questions from the Exam GH-200: GitHub Actions practice bank. Each includes the answer and explanation. Continue with the interactive practice above to review the full question set.

  1. 1A manually dispatched workflow defines a Boolean input named deploy. Which expression preserves its Boolean type when evaluating whether to deploy?

    1. A. ${{ github.event.inputs.deploy }}
    2. B. ${{ inputs.deploy }}
    3. C. ${{ env.deploy }}
    4. D. ${{ vars.deploy }}

    Answer: B

    Explanation: GitHub states that "the inputs context preserves Boolean values as Booleans instead of converting them to strings." Use inputs.deploy for the typed dispatch input; github.event.inputs exposes it as a string, while env and vars refer to different variable stores.

    Reference: Workflow syntax for GitHub Actions — on.workflow_dispatch.inputs — Note

  2. 2A matrix job has fail-fast: true, and none of its variants uses continue-on-error. One variant fails while others are running or queued. What happens to the remaining matrix jobs?

    1. A. Only queued jobs are canceled; running jobs finish.
    2. B. All remaining jobs finish before the failure is reported.
    3. C. In-progress and queued matrix jobs are canceled.
    4. D. All variants restart with the failed variant omitted.

    Answer: C

    Explanation: GitHub states that with fail-fast true, "GitHub will cancel all in-progress and queued jobs in the matrix if any job in the matrix fails." This is cancellation across the matrix, rather than waiting, restarting, or canceling only queued variants.

    Reference: Workflow syntax for GitHub Actions — jobs.<job_id>.strategy.fail-fast

  3. 3A Docker container action must run on a self-hosted runner. Which host configuration meets its documented execution requirements?

    1. A. Windows with Docker installed
    2. B. macOS with Docker installed
    3. C. Linux without a Docker installation
    4. D. Linux with Docker installed

    Answer: D

    Explanation: GitHub states, "Self-hosted runners must use a Linux operating system and have Docker installed to run Docker container actions." Both conditions matter; Docker alone on Windows or macOS and Linux without Docker do not meet them.

    Reference: About custom actions — Types of actions — Docker container actions

  4. 4An organization allows actions and reusable workflows only from repositories within that organization. Why does a workflow using actions/checkout fail this policy?

    1. A. The checkout action requires a public repository.
    2. B. The checkout action must be invoked as a reusable workflow.
    3. C. GitHub-authored actions are outside the organization-only allowance.
    4. D. Organization policies apply only to third-party JavaScript actions.

    Answer: C

    Explanation: GitHub states, "When you allow actions and reusable workflows from only in your organization, the policy blocks all access to actions authored by GitHub." The guide explicitly gives actions/checkout as an example, so GitHub authorship is not an automatic exception.

    Reference: Disabling or limiting GitHub Actions for your organization — Managing GitHub Actions permissions for your organization

  5. 5A job's permissions block specifies only contents: read. What access do unspecified GITHUB_TOKEN permission categories receive under this explicit block?

    1. A. They retain the repository's write defaults.
    2. B. They receive the same read access as contents.
    3. C. They are set to none.
    4. D. They inherit the triggering user's permissions.

    Answer: C

    Explanation: The syntax reference states, "If you specify the access for any of these permissions, all of those that are not specified are set to none." An explicit contents-only block therefore removes unspecified categories rather than inheriting broader access.

    Reference: Workflow syntax for GitHub Actions — permissions — access-level behavior

  6. 6A manual workflow should offer one selectable deployment tier from a predefined list. Which workflow_dispatch input type supports this interface?

    1. A. string
    2. B. boolean
    3. C. environment
    4. D. choice

    Answer: D

    Explanation: The documentation says, "The choice type resolves to a string and is a single selectable option." A choice input supplies the predefined single-selection list; string accepts text, boolean is a true/false value, and environment selects a repository environment.

    Reference: Workflow syntax for GitHub Actions — on.workflow_dispatch.inputs — Note

  7. 7A matrix uses fail-fast: true. Its experimental variant has continue-on-error: true, while stable variants have continue-on-error: false. Only the experimental variant fails. What is the effect on the stable variants?

    1. A. They continue rather than being canceled by this failure.
    2. B. They are canceled by fail-fast regardless of the exemption.
    3. C. They are restarted with continue-on-error enabled.
    4. D. They are marked successful without running their steps.

    Answer: A

    Explanation: GitHub explains, "If the job with continue-on-error: true fails, the other jobs will not be affected." The experimental exemption keeps its failure from triggering cancellation of the stable variants; it does not restart or preemptively pass them.

    Reference: Workflow syntax for GitHub Actions — jobs.<job_id>.strategy.fail-fast — combined continue-on-error example

  8. 8A JavaScript action must work on Ubuntu, Windows, and macOS GitHub-hosted runners without installing platform-specific executables. Which implementation follows the documented compatibility guidance?

    1. A. Use pure JavaScript without relying on other binaries.
    2. B. Call an Ubuntu-only binary from the JavaScript entry point.
    3. C. Package a Linux executable and invoke it on each platform.
    4. D. Assume every runner image has the same native command paths.

    Answer: A

    Explanation: GitHub states that for compatibility with all GitHub-hosted runner platforms, "the packaged JavaScript code you write should be pure JavaScript and not rely on other binaries." The alternatives introduce platform-specific executable assumptions that contradict this guidance and the stated deployment constraints.

    Reference: About custom actions — JavaScript actions

  9. 9An enterprise limits permitted actions. An organization owner wants to allow an additional external action that the enterprise policy does not permit. Which policy change is necessary to make that action eligible?

    1. A. The enterprise policy must permit the action.
    2. B. Only the organization's allowlist must include it.
    3. C. Only repository-level Actions settings must permit it.
    4. D. Only the workflow's job token permissions must grant it.

    Answer: A

    Explanation: GitHub warns, "You might not be able to manage these settings if your organization is managed by an enterprise that has overriding policy." An organization or repository cannot broaden an enforced enterprise allowance. Job token permissions control token access, not eligibility of an action blocked by enterprise policy.

    Reference: Disabling or limiting GitHub Actions for your organization — Managing GitHub Actions permissions for your organization

  10. 10A deployment job must request a GitHub OIDC JWT for cloud federation. Which workflow permission enables that request?

    1. A. id-token: write
    2. B. contents: write
    3. C. deployments: write
    4. D. packages: write

    Answer: A

    Explanation: GitHub states, "Without id-token: write, the OIDC JWT ID token cannot be requested." This permission enables token retrieval; it does not itself grant cloud-resource access or substitute for cloud trust configuration.

    Reference: OpenID Connect reference — Workflow permissions for the requesting the OIDC token — Required permission

Topics in this practice bank

These topics describe the available practice for Exam GH-200: GitHub Actions. Review the examination outline and its sources for scope and allocation details.

  • Author and manage workflows
    • Configure workflow triggers and events
    • Design and implement workflow structure
    • Manage workflow execution and outputs
  • Consume and troubleshoot workflows
    • Interpret workflow behavior and results
    • Access workflow artifacts and logs
    • Use and manage workflow templates
  • Author and maintain actions
    • Create and troubleshoot custom actions
    • Define action structure and metadata
    • Distribute and maintain actions
  • Manage GitHub Actions for the enterprise
    • Distribute and govern actions and workflows
    • Manage runners at scale
    • Manage encrypted secrets and variables
  • Secure and optimize automation
    • Implement security best practices
    • Optimize workflow performance and cost

How to use these free practice questions

Choose an answer, check the explanation, and review your progress by chapter. Practice questions and explanations are free to access without signing up.

These are independent study questions, not actual examination items. For examination requirements and official information, view Exam GH-200: GitHub Actions details.