Skip to content

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.