Workflow events and YAML
A workflow YAML file under .github/workflows defines triggers, jobs, and steps. Event selection determines which code and context run. Push, pull_request, workflow_dispatch, and other triggers have different security implications; valid YAML alone does not establish the intended workflow semantics. For example, a pull_request workflow runs tests while a separately controlled release workflow performs deployment.
A pull_request workflow runs tests while a separately controlled release workflow performs deployment.
A manual workflow begins when an authorized user requests workflow_dispatch. GitHub reads the applicable workflow definition and constructs jobs from its configuration and event context. A pull_request trigger instead evaluates a different development event with different trust assumptions. The workflow's path under .github/workflows and supported syntax matter; a YAML file elsewhere is not automatically an active workflow.
An event starts automation. A workflow defines the automation. A context exposes metadata such as revision and event fields. Select triggers from purpose: testing untrusted contributions should not silently gain deployment credentials. Quoting and valid indentation matter, but syntactically valid YAML can still select unintended branches or events. Validate actual trigger behavior in a controlled repository. When a run seems missing, inspect event eligibility and the workflow's location before debugging a nonexistent runner. A workflow title is display metadata, not permission or execution scope.
A pull_request workflow runs tests while a separately controlled release workflow performs deployment.
Do not overlook this operational distinction: Push, pull_request, workflow_dispatch, and other triggers have different security implications; valid YAML alone does not establish the intended workflow semantics.