GH-200 Practice Test
GitHub Actions Associate
GH-200 tests whether you can actually run GitHub Actions in production β matrix builds, reusable workflows, self-hosted runners, and OIDC β not just recite YAML syntax.
Our 500 scenario-based questions cover the full GH-200 blueprint across five domains: authoring and managing workflows (triggers, matrix strategy, contexts, expressions), consuming and troubleshooting workflows (logs, reusable workflows, starter workflows), authoring and maintaining actions (JavaScript/Docker/composite actions, versioning, Marketplace distribution), managing GitHub Actions for the enterprise (runner groups, org policies, secrets and variables at scale), and securing and optimizing automation (OIDC, GITHUB_TOKEN scoping, SHA pinning, immutable actions, artifact attestations). Every question is grounded against live GitHub and Microsoft Learn documentation, including current 2026 material like immutable action releases and Windows Server 2025 runner migration.
Start Free Practice β 40 QuestionsNo credit card required. Upgrade to full 500 questions for $19.99 when ready.
Is this for you?
This is NOT for you if:
GH-200 Exam Details
What to expect on exam day
Questions
40
Duration
100 minutes
Passing Score
700
Exam Cost
$99
Exam Domains Covered
Master all topics tested on the GH-200 exam
Author and manage workflows
Consume and troubleshoot workflows
Author and maintain actions
Manage GitHub Actions for the enterprise
Secure and optimize automation
Test Yourself Right Now
Try 5 real practice questions β no signup needed
5 Free GH-200 Questions
See how ready you are for the GH-200 exam. Each question includes a detailed explanation so you learn as you go.
Sample GH-200 Practice Questions
10 real questions from the free GH-200bank. Pick an answer in your head, then open βShow answerβ for the explanation.
1. A step needs to mask a dynamically generated value (not stored as a repository secret) so it never appears in plaintext in the workflow logs from that point forward. Which workflow command accomplishes this?
- A.
echo "::add-mask::$VALUE" - B.
echo "::stop-commands::$VALUE" - C.
echo "::set-secret::$VALUE" - D.
echo "::hide::$VALUE"
Show answer
Correct answer: A
The add-mask workflow command registers a runtime value for masking, causing GitHub Actions to replace any future occurrence of that exact string in the log output with ***, even though it was never stored as a configured secret. stop-commands is used to pause command processing for a block of log output, and set-secret and hide are not valid GitHub Actions workflow commands.
- A.
2. A calling workflow needs to pass a string value into a reusable workflow invoked with
uses: org/repo/.github/workflows/build.yml@v1. Where should that value be declared?- A. As a repository variable, since reusable workflows cannot receive inputs directly
- B. Under a
with:block on the job that calls the reusable workflow, matching aninputs:entry the reusable workflow declares underon: workflow_call - C. Inside the
env:block of the calling job, since workflow_call automatically maps env vars to inputs - D. In the
secrets:block, since data passed to reusable workflows must be treated as sensitive
Show answer
Correct answer: B
Reusable workflows declare accepted parameters under
on: workflow_call: inputs:, and the calling job supplies matching values in awith:block, the same pattern used for actions. Reusable workflows do support direct inputs, plain env vars are not auto-mapped to workflow_call inputs, and non-sensitive values do not need to go through secrets:.3. A step needs to pass a computed version string to later steps in the same job. Which mechanism is the current recommended approach?
- A. Use the deprecated
::set-output name=version::1.2.3workflow command, which remains the primary recommended method - B. Write the value to a file named
output.txtin the workspace and hope later steps read it by convention - C. Print the value to stdout; GitHub automatically parses stdout for key=value pairs
- D. Write
echo "version=1.2.3" >> "$GITHUB_OUTPUT"in the step and reference it as${{ steps.<id>.outputs.version }}
Show answer
Correct answer: D
Writing key=value pairs to the file referenced by the GITHUB_OUTPUT environment variable is the current supported way to set step outputs, consumed as steps.<step-id>.outputs.<name>. The ::set-output:: workflow command is deprecated, writing to an arbitrary file has no built-in consumption mechanism, and GitHub does not parse arbitrary stdout for key=value pairs.
- A. Use the deprecated
4. A step needs to set a multi-line string as a step output (for example, a formatted changelog) using GITHUB_OUTPUT. Using a single
echo "name=value" >> "$GITHUB_OUTPUT"line will not work correctly for multi-line content. Which syntax correctly handles this?- A. Escape each newline character with a backslash before writing to GITHUB_OUTPUT
- B. Base64-encode the value and let GitHub Actions automatically decode GITHUB_OUTPUT entries
- C. Use a heredoc-style delimiter: write
name<<EOFto GITHUB_OUTPUT, then the multi-line content, then a closing line containing justEOF - D. Write each line as a separate GITHUB_OUTPUT entry using the same output name repeated
Show answer
Correct answer: C
For multi-line values, GitHub Actions requires a delimiter-based (heredoc) syntax - writing name<<DELIMITER, then the raw multi-line content, then a closing line containing just DELIMITER - to the GITHUB_OUTPUT file, which correctly captures embedded newlines as a single output value. Escaping newlines manually is unsupported and error-prone, GitHub Actions does not auto-decode base64 content in GITHUB_OUTPUT, and repeating the same output name across multiple lines simply overwrites the value rather than concatenating it.
5. Which workflow command is used inside a step to add a line of text to the run's visible job summary, rendered as Markdown on the run page?
- A. Use
::notice::with a summary flag - B. Write to
$GITHUB_ENV - C. Write to the file referenced by
$GITHUB_STEP_SUMMARY - D. Use
::debug::prefixed with summary=true
Show answer
Correct answer: C
Appending Markdown content to the file path in the GITHUB_STEP_SUMMARY environment variable renders that content as a per-step (and aggregated per-job) summary on the workflow run page. ::notice:: creates an annotation, not a summary section, GITHUB_ENV sets environment variables for later steps, and ::debug:: only affects debug logging visibility.
- A. Use
Show 5 more questions
6. A job has
continue-on-error: trueset on a flaky integration-test step. The team notices the job shows an overall green check even when that step fails, but they still want a later "publish-results" step in the same job to detect the failure and annotate the run. What should they add?- A. Remove continue-on-error, since it makes step failures permanently undetectable
- B. Give the flaky step an
id, then checksteps.<id>.outcome == 'failure'in anif:on the publish-results step, since continue-on-error changes conclusion but preserves the step's raw outcome - C. Add a second identical step without continue-on-error so the failure will surface
- D. Wrap the flaky step in a separate job, since continue-on-error is scoped to the job level
Show answer
Correct answer: B
continue-on-error changes a failing step's conclusion to success (so the job overall does not fail) but leaves steps.<id>.outcome reporting the real result, so a later step can key off outcome to detect and react to the underlying failure. Removing the flag would fail the whole job on flakiness, duplicating the step does not expose outcome differently, and continue-on-error is valid at the step level exactly as used here.
7. Which event fires when a new tag matching a semantic version pattern is pushed to a repository?
- A. release
- B. workflow_dispatch
- C. push
- D. create
Show answer
Correct answer: C
Tags are pushed via git, so the push event fires and can be filtered with a tags: pattern such as "v*". The release event fires when a GitHub Release is published (a separate action from pushing a tag), create fires for branch or tag creation in general and is broader/less commonly used for this purpose, and workflow_dispatch is a manual trigger unrelated to tag pushes.
8. Which statement correctly describes the default permissions granted to the GITHUB_TOKEN for a workflow triggered by a pull_request event from a forked repository?
- A. The token inherits write access to contents and pull-requests, matching the base repository owner
- B. No token is generated for fork-triggered pull_request events
- C. The token receives admin-level permissions so it can merge the pull request automatically
- D. The token is granted read-only permissions by default, regardless of the repository-level default permission setting
Show answer
Correct answer: D
For pull_request events triggered from a forked repository, GitHub always issues a GITHUB_TOKEN with read-only permissions, overriding the repository default, to prevent fork contributors from using workflow automation to write to the base repository. A token is still generated (just scoped down), it does not inherit the owner-level write access, and it is never elevated to admin.
9. Which context would you use inside a step to read a workflow-level environment variable defined under a top-level
env:block?- A.
${{ vars.VAR_NAME }} - B.
${{ env.VAR_NAME }} - C.
${{ secrets.VAR_NAME }} - D.
${{ github.env.VAR_NAME }}
Show answer
Correct answer: B
The env context exposes environment variables set at the workflow, job, or step level via env: blocks, or written to GITHUB_ENV. The vars context is for configuration variables (organization/repo/environment scoped), secrets is for encrypted secrets, and github.env is not a valid path.
- A.
10. A job named
deployneeds to run only after bothbuildandtestsucceed, but should also run iftestis skipped because the triggering event was a documentation-only push (where a prior step sets an output marking tests as skipped). Whichneedsandifcombination is correct?- A.
needs: buildalone, since listing test would block deploy whenever test is skipped - B.
needs: [build, test]with no if condition, since skipped jobs are treated as successful by default - C. if: needs.test.outputs.skipped == true with no needs: key declared
- D.
needs: [build, test]on deploy, withif: always() && needs.build.result == 'success' && (needs.test.result == 'success' || needs.test.result == 'skipped')
Show answer
Correct answer: D
Listing both jobs in needs establishes the dependency and gives access to needs.<job>.result, and always() overrides the default implicit success() check so the job evaluates even when a dependency was skipped; the explicit result check then allows either a successful or a skipped test job while still requiring build to succeed. Omitting test from needs would remove the ordering guarantee entirely, skipped jobs are not automatically treated as successful for downstream if: logic, and referencing needs.test.outputs without declaring needs: test would fail since the dependency and its outputs are not established.
- A.
GH-200 study resources
Why Practice with MSCertQuiz?
Microsoft Learn teaches concepts. We prepare you for the actual exam.
Deep coverage of the security domain most candidates underestimate: OIDC federation, GITHUB_TOKEN lifecycle and scoping, SHA-pinning third-party actions, and the 2026 immutable-actions enforcement on hosted runners
Real matrix-strategy and reusable-workflow scenarios (fail-fast, max-parallel, workflow_call inputs/secrets, nested reusable workflow limits) β the operational details that separate hands-on practitioners from YAML memorizers
Enterprise-scale content most free question banks skip entirely: runner groups, IP allow lists, org-level action allow/deny policies, and secrets scoped at org/repo/environment levels
Every question verified against a live-fetched GitHub Learn or Docs page before it ships, so content stays accurate as GitHub Actions features keep shipping
Not sure if you're ready for the GH-200 exam?
Take the free GH-200 Readiness Check βWhat Our Users Say
βThe OIDC and GITHUB_TOKEN scoping questions were exactly what tripped me up on a first read of the docs. Practicing scenario after scenario here made the security domain click before exam day.β
Dev K.
GH-200 Certified
βI write workflows daily but had never touched runner groups or org-level action policies. The enterprise-governance questions filled real gaps in my knowledge. Passed on my first attempt.β
Sara R.
DevOps Engineer
βMatrix strategy and reusable workflow questions were much closer to real production patterns than anything else I tried. The explanations actually taught the reasoning, not just the answer.β
Leo M.
Passed GH-200 first try
Choose Your Plan
Start free, upgrade when you're ready to get serious
Free
Good for exploring the platform
- 40 practice questions
- Practice mode only
- Progress tracking
- No exam simulation mode
GH-200 Full Access
Best if your exam is in the next 2-4 weeks
- 500 practice questions
- Practice & Exam modes
- Detailed explanations
- Lifetime access
7-day money-back guarantee
Pro β All Certs
Best if you're planning multiple Microsoft exams
- ALL certifications included
- Unlimited questions
- New certs added free
- Cancel anytime
Save 30% vs buying individually
Your GH-200Exam Won't Wait
Candidates who complete at least 2 full mock exams pass at significantly higher rates than those who only study passively.
Don't risk $99 on the real exam without testing yourself first.
Start Free Practice NowNo credit card required β’ 40 free questions β’ Upgrade for $19.99 when ready
Official Microsoft Resources
Our practice questions are aligned with official Microsoft exam objectives. We recommend studying with Microsoft Learn first, then using MSCertQuiz to test your readiness.
View Official GH-200 Exam DetailsGH-200 Frequently Asked Questions
Everything you need to know about the GH-200 GitHub Actions certification
What is GH-200?
How much does the GH-200 exam cost and how long is it?
What is the passing score for GH-200?
What topics are covered on GH-200?
How hard is GH-200?
How long should I study for GH-200?
What are the prerequisites for GH-200?
Who should take GH-200?
Also Preparing For
Candidates studying GH-200 often prepare for these certifications next.