GitHub Actions: From Event to Step
Why automate a repository?
A team should not rely on everyone remembering to test a change. Continuous integration (CI) runs defined checks when selected repository events happen. For the garden-notes project, the check requires notes.txt to contain a watering interval with its unit. CI provides evidence about a particular revision, not proof that the whole application works. Git itself does not schedule hosted workflow runs.
Trace the hierarchy
An event is a trigger, a workflow is the automation definition in .github/workflows/, a run is one execution of that definition, a job groups steps, and a runner is the machine assigned to a job. Within a job, steps normally execute in order on the same runner. Separate jobs can run concurrently unless dependencies or scheduling constraints prevent it. run executes shell commands; uses calls an action or, at job level, a reusable workflow.
Read a minimal workflow
This self-contained workflow has no checkout and does not access repository files. Its manual trigger requests a run, permissions: {} grants no token permissions, and the job executes one harmless shell command. For manual dispatch the workflow must exist on the default branch. The sample is static, not a hosted execution.
name: Greetingon: [workflow_dispatch]permissions: {}jobs: hello: runs-on: ubuntu-latest steps: - run: printf '%s\n' HelloChoose a runner
A GitHub-hosted runner is provisioned by GitHub; a self-hosted runner is managed by its owner. Do not assume that tools, operating systems, or persistent state match your laptop. In particular, untrusted contribution code should not run on a privileged persistent runner. A runner label selects an eligible execution environment, not a guarantee of an exact software version.
Predict and verify
Identify the event, job ID, runner label, and executable step in the example. Predict Hello followed by a newline. The offline lab checks the structure and runs that exact greeting command locally; it does not schedule a runner or call GitHub. For a real authorized run, inspect the run ID and job log before claiming success.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
GitHub Actions: From Event to Step — knowledge check
Reason about GitHub Actions workflow behavior and safety.
Which unit executes a job’s steps?
What is one execution of a workflow called?
Where are workflow definitions stored?
What normally executes a shell command?
What does a runner label establish?