fix(ci): set TURBO_SCM_BASE for --affected to work in PRs
Turbo defaults to comparing against `main`, but PRs target `dev`. Without explicit base/head refs, --affected falls back to running all tasks. Use the PR base SHA for pull_requests, the before SHA for pushes, and HEAD~1 as a last resort.
This commit is contained in:
1 file changed
+2
@@ -20,6 +20,8 @@ env:
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
|
||||
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha || github.event.before || 'HEAD~1' }}
|
||||
TURBO_SCM_HEAD: ${{ github.sha }}
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
||||
Reference in new issue
Block a user