Edit this page
Learn which triggers are available to work with Workflows.
Triggers define when a workflow should kick off. When its conditions are met, the workflow will start.
You can trigger a workflow on a push to a GitHub branch with the push
trigger.
name: Hello World
on:
push:
branches:
- 'main'
- 'feature/**'
# other branches names and globs
jobs:
# ...
You can trigger a workflow on a pull request with the pull_request
trigger.
name: Hello World
on:
pull_request:
branches:
- 'main'
# other branch names and globs
jobs:
# ...
Workflows also support triggering on all branches, on both push and pull request events:
name: Hello World
on:
push: {} # this will default to `branches: ['*']`, meaning "run on all branches"
pull_request: {}
jobs:
# ...