GH-200 domain - 25% of the exam

Author and manage workflows

Author and manage workflows is 25% of the GitHub Actions (GH-200) (GH-200) exam. These are the objectives it covers, each with practice questions and worked explanations.

Objectives in this domain

Sample question from this domain

Free sampleAuthor and manage workflowsmedium

A maintenance workflow must run automatically every night at 02:00 UTC to prune stale caches, with no human starting it and no code change needed to fire it. Which trigger should be configured at the top of the workflow file?

on:
  <trigger>:
    - cron: '0 2 * * *'
  • Aschedule, because it accepts one or more cron expressions and triggers the workflow on the defined recurring time-based interval. Correct
  • Bworkflow_dispatch, because a recurring nightly job is started from the Actions tab and the cron expression sets the default run time.
  • Crepository_dispatch, because it listens for a timed webhook that GitHub emits internally to drive cron-based recurring runs.
  • Dpush, because adding a cron filter under the push event tells GitHub to replay the last push on the recurring schedule.
Recognise that the schedule event with a cron expression is the trigger for recurring time-based workflow runs. GitHub Actions runs a workflow on a recurring timetable only through the schedule event, which accepts cron expressions evaluated in UTC. A cron entry such as '0 2 * * *' therefore fires the workflow nightly at 02:00 UTC with no commit and no manual action. The other events fire on a push, a manual button, or an externally posted custom event, and none of them honours a cron field.

Why A is correct: The schedule event takes a list of cron expressions evaluated against UTC, so '0 2 * * *' fires the workflow every night at 02:00 without any human action or code change.

Why B is wrong: Tempting because workflow_dispatch also appears under on, but it only enables a manual run button and accepts no cron field, so it cannot fire the job automatically at 02:00 UTC.

Why C is wrong: Tempting because repository_dispatch is also event driven, but it fires only when an external system posts a custom event to the API, not on any internal timer, so a cron field is ignored here.

Why D is wrong: Tempting because push is a very common trigger, but it fires only when commits are pushed and supports no cron field, so it cannot produce a nightly time-based run.

Other domains in this exam

See also the GH-200 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by GitHub. Original, blueprint-aligned practice material only.