Workflows
How do I run a job only on pull requests?
Quick answer
Use the pull_request trigger, and an if condition for finer control such as skipping drafts.
The detail that matters
Prefer pull_request over pull_request_target. The latter runs with write permissions in the base repo's context and is a known way to leak secrets.
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
How many jobs can a matrix fan out to?GitHub caps a single matrix at 256 jobs per workflow run.How do I reproduce a CI failure locally?Match the runner image, then SSH into a live runner if the failure only appears in CI.Can I SSH into a runner?Yes. runnerhut supports opening a debug session on a running job with an authorised SSH key.Can I mix GitHub-hosted and managed runners?Yes. runs-on is per job, so different jobs in one workflow can use different providers.