GH-200 cheat sheet
One page for the last review before the exam. For the reasoning behind each line, see the study guide and syntax primer.
Pass = 700. WORKFLOW 20–25 · ENTERPRISE 20–25 · TROUBLESHOOT 15–20 · ACTION 15–20 · SECURITY 10–15. Outline rewritten Jan 2026.
Eventsworkflow_dispatch (manual; inputs: string/boolean/number/choice/environment) · repository_dispatch (external API) · workflow_run (after another workflow) · workflow_call (reusable: inputs/secrets/outputs; secrets: inherit) · schedule: - cron: (UTC, default branch) · check_run (Checks API) · pull_request: types: [labeled] + branches + paths
Structure.github/workflows/ · needs: · if: github.ref_name == 'x' · strategy.matrix + include/exclude, fail-fast (true), max-parallel · services: + --health-cmd · anchors & + aliases * (one file only; no <<: merge keys) · concurrency: group · shell: python
Data Step → later steps: >> $GITHUB_ENV · output: >> $GITHUB_OUTPUT → needs.j.outputs.x · files: artifacts (after run; 90 d) · deps: cache (7 d idle) · report: $GITHUB_STEP_SUMMARY · run number: $GITHUB_RUN_NUMBER / github.run_number · GITHUB_REPOSITORY, GITHUB_REF, GITHUB_ACTOR
Debug::debug::msg · ACTIONS_STEP_DEBUG=true · ::error file=,line=:: · ::add-mask:: · logs API GET …/runs/{id}/logs · delete only completed runs · disable ≠ delete · rerun single matrix job
Actions Composite (steps, simplest) · JavaScript (TS, core.setFailed) · Docker (action.yml + Dockerfile) · Marketplace: public, one per repo, action.yml at root, unique name · consumers pin SHA > tag · own repo per action
Enterprise Self-hosted: labels + groups, _diag logs, >6 h, private network · IP allow list → self-hosted/larger static IP · policies: allow-list / local only / verified creators · org secret → selected repos · templates in org .github · GHES: GitHub Connect or actions-sync
Secrets env > repo > org · no secrets for fork PRs · not in if: directly · REST: encrypt with the public key · environment secrets after reviewer approval (30-day wait)
Security Untrusted input → env: → "$VAR" · pull_request_target is dangerous · permissions: least privilege · GITHUB_TOKEN per job vs PAT · OIDC id-token: write · pin full SHA · attest-build-provenance + gh attestation verify
Templates vs reuse Template = copy · reusable workflow = central, versioned · composite action = steps