Every way to start a workflow: push with branch, tag and path filters, pull requests, manual runs with inputs, cron schedules, releases and calls from other workflows.
| Goal | Trigger |
|---|---|
| Test every change | pull_request + push: branches: [main] |
| Release a version | push: tags: ['v*.*.*'] |
| Deploy on demand | workflow_dispatch with an environment input |
| Nightly jobs, cleanup | schedule (cron, UTC) |
| Share one pipeline across repos | workflow_call |
| Monorepo: build only what changed | paths: filters |
Read manual inputs with ${{ inputs.environment }}. Trigger from CLI: gh workflow run deploy.yml -f environment=production.
branches and tags under the same push are OR-ed: a tag push is not filtered by branches.schedule runs only on the default branch and can be delayed at busy times.GITHUB_TOKEN do not start other workflows (prevents loops); use a GitHub App token or PAT if you need chaining.Avoid pull_request_target unless you understand it: it runs with write access and secrets in the context of the base repo, which is dangerous with code from forks.