Skip to content

GH-200 study guide ​

The domains are in weight order. For YAML questions, check where each key sits before judging what it does. The syntax primer has the full annotated workflow.

Know cold vs. look up later ​

Know ColdSearchable If Needed
Five domains and weightsFull list of webhook events and activity types
.github/workflows/; on: shapes; cron under schedule (UTC, default branch)Cron edge cases
workflow_dispatch vs repository_dispatch vs workflow_run vs workflow_callPayload field names
needs.<job>.outputs.<x>; GITHUB_OUTPUT / GITHUB_ENV / GITHUB_STEP_SUMMARYSize limits of env files
Matrix: include/exclude, fail-fast (default true), max-parallelMatrix job cap
Cache (reuse, evicted after 7 days idle) vs artifact (keep outputs, 90-day default)Exact storage quotas
Action types and action.yml; Marketplace rulesBranding icon names
Secret scope precedence env > repo > org; no secrets for fork PRsREST endpoint paths
GITHUB_TOKEN vs PAT; permissions:; OIDC id-token: writeCloud-side trust policy syntax
Pin by full SHA; allow-list policies; attestationsSLSA level definitions

Workflow authoring (20–25%) ​

CueAnswer
Manual run with typed inputsworkflow_dispatch + inputs (string, boolean, number, choice, environment)
External system triggers a runrepository_dispatch (API)
Run after another workflow finishesworkflow_run
Reuse a whole workflowworkflow_call; caller uses: owner/repo/.github/workflows/f.yml@ref + with: / secrets: (or inherit)
Label-triggered PR deploy on some pathspull_request: types: [labeled], branches, paths
Branch name in if:github.ref_name
Job B needs A's valueA: outputs:; B: needs.A.outputs.x
Env for later steps>> $GITHUB_ENV
Test DB for the jobservices: + health-check options
Many OS/version combosstrategy.matrix (+ include/exclude, fail-fast, max-parallel)
Repeated mappings in one fileYAML anchors &x + aliases *x (merge keys <<: are not supported)
Stop parallel deploysconcurrency: group (+ cancel-in-progress)
Human approvalEnvironment with required reviewers (repo Settings › Environments)
Rich report on the run page$GITHUB_STEP_SUMMARY
Env var scopesworkflow env, jobs.<id>.env, step env (step is the smallest)

Enterprise (20–25%) ​

CueAnswer
Specific custom hardware/software runnerSelf-hosted + custom labels; runs-on: [self-hosted, label]
Restrict who uses runnersRunner groups
> 6 h jobs, private networkSelf-hosted
IP allow list on orgSelf-hosted with known IPs or larger runners with static IPs
Missing tool on hosted runnersetup-* / package manager / container at runtime; cache it
Block Marketplace actionsAllow-list policy (only listed run)
Only org-owned actions"Local actions only" → actions live in org repos
Share a secret with chosen reposOrg secret, Selected repositories
Standard scaffoldsWorkflow templates in org .github repo
GHES third-party actionsGitHub Connect or manual actions-sync

Troubleshooting (15–20%) ​

  • Debug: ACTIONS_STEP_DEBUG=true (secret or variable) or re-run with debug logging; ::debug:: lines.
  • Stuck job on a self-hosted label: runner _diag logs; check which runner served the last success.
  • Download logs: GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs; artifacts need only read access.
  • Delete only completed runs. Disable a workflow to stop triggers without deleting the file.
  • Matrix failures: the job name shows the axis values; rerun that job or all failed jobs.
  • Storage pressure: shorten retention, delete artifacts.

Custom actions (15–20%) ​

  • Composite = bundled shell steps (simplest); JavaScript = code (TypeScript compiles to JS; core.setFailed); Docker = action.yml + Dockerfile.
  • Inputs and outputs are declared in action.yml. Workflow commands: ::debug::, ::error file=…,line=…::, ::add-mask::.
  • Marketplace: public repo, one action per repo, action.yml at root, unique name.
  • Consumers pin tag (convenient) or SHA (immutable); keep each action in its own repo for independent versioning.
  • Test an action with a workflow that runs just that action.

Security (10–15%) ​

  • Untrusted input → env: then "$VAR"; never ${{ github.event.* }} inline in run:.
  • pull_request_target has secrets; don't run PR head code in it.
  • permissions: least privilege; GITHUB_TOKEN is per-job and short-lived; PAT only when the token can't do it.
  • OIDC to the cloud: id-token: write; no stored cloud secret.
  • Pin third-party actions to full SHAs; allow-list policies.
  • Attestations: attest-build-provenance (+ id-token, attestations: write), verify with gh attestation verify.
  • Environment secrets unlock after approval; approval waits fail at 30 days.

Traps that look right ​

Tempting answerWhy it's wrong
set-output / set-envDeprecated; use env files
github.ref.name / github.branchDoesn't exist; github.ref_name
on: cron:Must be on: schedule: - cron:
Environment created in org settingsEnvironments are repo-level
shell: nodejsNot a valid shell
Tag pin as "prevents updates"Tags are mutable; SHA is immutable
Hosted runners work with an IP allow listOnly self-hosted or larger (static IP) runners
Docker action needs metadata.ymlIt's action.yml + Dockerfile
"GitHub-created actions can't be disabled"They can
concurrency: 1 / "mutex"Not features; concurrency: group
Secrets in if:Not allowed directly; map to env
Checkout needs an explicit GITHUB_TOKENUses it implicitly

Decision rules and drills ​

1. Solve the scope before the syntax ​

Ask: is this a step, job, workflow, repository, organization, or enterprise requirement? Draw the path the data must follow before selecting an answer.

  • $GITHUB_ENV: make a value available to subsequent steps in the same job; the writing step does not receive the new value through that mechanism.
  • $GITHUB_OUTPUT: set a step output. Cross-job consumption requires mapping a job output and using needs.
  • $GITHUB_STEP_SUMMARY: publish a Markdown job summary.

Drill: explain how a version calculated in job A reaches a deployment step in job B, without relying on a shared shell environment. Workflow commands.

2. Separate the three reuse mechanisms ​

RequirementFirst mechanism to consider
Reuse a group of steps inside a jobComposite action
Reuse centrally maintained jobs/workflow logicReusable workflow invoked at job level
Give teams a starting file they independently editStarter workflow/template

Drill: identify where uses belongs for each. For reusable workflows, trace input, secret, and output mappings. Do not assume environment secrets are passed like ordinary caller secrets: a called job's environment can determine which environment secret is used. Reuse concepts, reusable workflow configuration.

3. Expand matrices on paper ​

Multiply the base axes, cross out excluded combinations, then inspect each inclusion: it may extend an existing combination or add another. Do not automatically add one job per include entry.

Distinguish max-parallel (simultaneous matrix jobs), fail-fast (cancellation behavior across the matrix), and job-level continue-on-error (tolerance of a particular job's failure).

Drill: use two operating systems and three runtime versions; exclude one pair, then add an extra runtime/OS pair. Write every resulting job before counting. Matrix behavior and examples.

4. Treat runner selection as two questions ​

Who may use the runner? Runner groups and access policies. Which machine characteristics does the job require? Runner labels and routing.

Drill: explain why a matching label alone does not establish that a repository can access the runner group. Review enterprise policy, private-network requirements, installed tools, and maintenance responsibilities separately. Runner groups, runner labels.

5. Identify the trust boundary in security questions ​

For every proposed solution, identify whose code executes and which credentials it receives. Running untrusted pull-request code in a privileged pull_request_target workflow is a security trap; changing the trigger alone does not make that code trusted. Official guidance.

For cloud federation, distinguish requesting a GitHub OIDC token from authorization in the cloud. id-token: write permits requesting the token; cloud trust conditions and the assigned cloud role determine access. It does not itself grant write access to cloud resources. OIDC permissions.

Drill: explain the security failure in a workflow before proposing a permission or trigger change.

6. Separate cache restoration from an exact cache hit ​

A fallback restore can provide files without an exact match to the primary key. Read the ordered restore-keys; existing cache contents cannot be updated in place under the same cache entry. Choose a new key when the cached content must change. Dependency caching reference.

Drill: explain what happens after a dependency lockfile changes, and why a broad fallback cache may still be useful.

7. Debug the right layer ​

ACTIONS_STEP_DEBUG=true adds step logging. ACTIONS_RUNNER_DEBUG=true adds runner diagnostic logs. These can be configured using a secret or variable; where both exist, the secret wins. Debug logging.

Drill: distinguish a queued job that cannot find an eligible runner from a running job whose shell command failed. Start with runner eligibility for the first, the failing step and logs for the second.

A focused final 90 minutes ​

This is a suggested final review, not a complete course or a promise of readiness:

  1. 20 min: enterprise policy, runner groups, secret/variable scopes. Explain the required configuration level aloud.
  2. 25 min: trace three short workflows: matrix expansion, output passing across jobs, reusable workflow invocation.
  3. 15 min: review one JavaScript, Docker, and composite action's metadata. Explain how inputs, execution, and outputs connect.
  4. 15 min: security scenarios: untrusted PR code, token permissions, OIDC trust, action pinning, artifact provenance.
  5. 15 min: revisit incorrect and lucky answers. For each, write one rule and why the strongest distractor fails.

Personal study notes written from official documentation. Not affiliated with Microsoft or GitHub. Contains no exam questions.