Author and Manage Workflows Study Guide — GH-200

25% of the exam · domain 1 of 5 · GitHub Actions · Free Author and Manage Workflows practice questions

0 of 57 topics covered
What the exam asks here — tap to tick off0 / 16 covered
Domain 1 of 5

Author and Maintain Workflows

This domain tests your ability to write, read, debug, and maintain GitHub Actions workflow YAML files for CI/CD pipelines and automation tasks. It is the heaviest-weighted domain at 40% of the exam, meaning roughly 20 out of 50 questions will require you to understand workflow syntax, event triggers, job coordination, secrets handling, artifact management, and debugging techniques with enough precision to distinguish between near-identical YAML configurations.


Workflow YAML Structure

Every workflow file lives in .github/workflows/ and must be valid YAML. The four required top-level keys are:

KeyPurposeRequired
nameDisplay name in the Actions UINo (defaults to filename)
onEvent(s) that trigger the workflowYes
jobsMap of one or more jobs to runYes
stepsList of steps within each jobYes (per job)

A job must have a runs-on key. Steps can use uses (an action) or run (a shell command), never both in the same step.

name: CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: echo "Hello"

Common traps

  • Putting steps at the workflow level instead of inside a job.
  • Using both uses and run in the same step — this is invalid.
  • Omitting runs-on from a job — the workflow will fail to parse.
  • Confusing jobs.<id>.name (display name) with the job ID (the YAML key).

Event Triggers

Bold keywords: on, push, pull_request, schedule, workflow_dispatch, repository_dispatch

TriggerWho/What fires itKey sub-keys
pushA commit pushed to matching branches/tagsbranches, tags, paths
pull_requestPR opened, synchronised, or reopenedbranches, types, paths
schedulePOSIX cron on UTC clockcron
workflow_dispatchManual trigger from UI or APIinputs
repository_dispatchExternal HTTP POST to GitHub APItypes

Cron syntax: five fields — minute, hour, day-of-month, month, day-of-week. Example: '0 8 * * 1' = every Monday at 08:00 UTC. The minimum schedule interval is every 5 minutes.

workflow_dispatch inputs support types: string, boolean, choice, environment. Default values can be set. Inputs are accessed via ${{ inputs.input_name }}.

repository_dispatch requires a client_payload in the POST body and a matching types filter. It can only be triggered on the default branch.

Common traps

  • pull_request default activity types are opened, synchronize, reopened — not all PR events.
  • schedule runs only on the default branch of the repository.
  • workflow_dispatch inputs are optional by default unless required: true is set.
  • Paths filter uses glob patterns; paths-ignore and paths cannot both be set for the same event.
  • repository_dispatch only fires on the default branch, regardless of the branch specified in the API call.

Sign in free to read the full guide

17 more sections (about 2,757 words) continue below. The first domain's study guide is free for every GH-200 learner with a free account.