Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Events · GitHub Actions

Direct answer

Events trigger GitHub Actions workflows, defined under on:, such as push, pull_request, schedule, workflow_dispatch for manual runs, release or repository_dispatch from external systems.

When to use this

Use this when choosing what triggers a workflow.

First 30 seconds

1. Events trigger workflows.

2. pull_request from forks runs without secrets (good).

3. pull_request_target has secrets — never check out untrusted code with it.

4. Filter by branches/paths.

5. workflow_dispatch for manual runs.

Operational verification

event → filter → workflow

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
GitHub Actions current
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformGitHub Actions current · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when choosing what triggers a workflow.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

Generate or select representative events and inspect resulting workflow runs with GitHub UI/API/CLI. Confirm event, headSha, branch/ref and activity context match the intended trigger, then show that filtered-out cases do not create runs. Test edge cases such as path-only changes, target branch differences, manual dispatch inputs and simultaneous event types if the workflow supports them. Within a diagnostic step, safely inspect selected github context fields—never dump secret-bearing contexts wholesale. A run existing is only trigger evidence; continue to job/step conditions and final target verification to show the automation's outcome. For security-sensitive pull-request triggers, verify which workflow revision and permission model executed. Keep the event/action, workflow commit and run ID together so later analysis can reproduce why the run existed.

Step 2 Common mistakes Narrow the fault
  • Triggers too broad, running on every push.
Step 3 Where it fails Narrow the fault

The boundaries are GitHub event generation, workflow trigger filtering, workflow-file/ref selection, run creation, job/step conditions and external action targets. If there is no run, show the event and trigger rules before debugging runner code. If a run exists but a job is absent/skipped, inspect job conditions and permissions rather than changing on. Default-branch-only event behavior and fork security rules can explain apparently missing triggers without any YAML syntax error. Multiple events may legitimately create multiple runs; suppress duplicates only with a deliberate concurrency/idempotency design. Preserve the event metadata and run identity before editing the workflow. After correction, repeat the same event scenario and verify both expected run creation and the original consumer-facing outcome.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Workflows start on events such as push, pull_request, schedule or workflow_dispatch.
  • Path and branch filters narrow triggers.
  • pull_request_target runs with write access; use with care.
Key checks
  • on: triggers (push, pull_request, workflow_dispatch, schedule) — events
  • pull_request_target used carefully — security
  • gh run list --event <event> — runs per event
ReferenceWhy it matters1 section · depth on demand

In depth

Events are what trigger GitHub Actions workflows: repository activity, schedules, manual dispatch, other workflows or external API calls.

EventTypical use
pushBuild/deploy on branch or tag
pull_requestChecks before merge (read-only token for forks)
scheduleNightly drift checks (cron, UTC)
workflow_dispatchManual run with inputs
repository_dispatchTriggered by an external system
workflow_runRun after another workflow

Be careful with pull_request_target: it runs with write permissions and secrets in the context of the base repository, so never check out and run untrusted PR code there.

ReferenceImportant terms & boundaries1 section · depth on demand

Mechanics

GitHub Actions events are evaluated through the workflow's on configuration. An event name such as push, pull_request, workflow_dispatch or schedule can have activity types and filters for branches, tags or paths, and some events only trigger when the workflow file exists on the repository's default branch. Each accepted occurrence creates a workflow run with event metadata exposed through the github context and environment variables. Multiple qualifying activity types can create multiple runs from what an operator perceives as one user action, and pull_request versus pull_request_target have materially different security/context semantics. The triggering event selects a workflow revision/ref context; it does not guarantee that every job runs, because later job/step if expressions, permissions and concurrency rules can skip or cancel execution.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Lifecycle

Treat trigger configuration as part of the workflow's public interface. Review changes to event names, activity types, branch/path filters and manual inputs with the same care as job logic because an overly broad trigger can execute privileged automation unexpectedly. Keep workflow files in the required repository path and understand default-branch requirements for events that use the default branch's workflow definition. For pull-request automation, minimize permissions and avoid exposing trusted secrets to untrusted fork content. Use concurrency intentionally when newer runs should supersede older ones, and document whether duplicate events are acceptable. When renaming branches or reorganizing paths, update filters in the same change so automation does not silently stop. Preserve event payload assumptions in tests rather than depending on a single repository action observed interactively.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docGitHub Actions current current

Authoritative/upstream documentation reviewed for bounded claims in GitHub Actions > Events. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows · confidence 94%
Embedded reference data

Quick lookup tables

GitHub Actions → Events · operational reference

Context-specific ownership, verification, output and failure-boundary lookup for GitHub Actions → Events.

LayerGitHub Actions → Events operational reference
Context identityGitHub Actions current + exact revision/input/target identity
Persistent intentVersioned contract/configuration with explicit ownership and prerequisites
VerificationValidate inputs/read current state → exercise bounded operation → independent target read-back
Output contractPreserve structured status/IDs/properties before human formatting
Failure boundarySeparate source/input/engine/controller execution from downstream target outcome
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

Trigger diagnostics should record workflow name/file, run ID, event name, activity where applicable, repository, actor, head_sha/ref, workflow revision and whether branch/path filters were satisfied. The raw webhook payload can be large and may contain untrusted or sensitive values, so retain only the fields required to explain the decision. Distinguish 'no workflow run created' from 'run created but job skipped' and 'job ran but step failed'; those are different boundaries. For manual dispatch, keep the typed/normalized inputs context values because booleans and strings can differ from legacy event payload representations. When concurrency cancels an older run, report cancellation as workflow policy rather than as a trigger failure. This output model turns event behavior into an auditable decision instead of a list of colored run badges.

Confirmation

Confirm action

Continue?