Reduce duplicate CI/Netlify builds per PR push - #5412
Conversation
- test.yml now cancels in-progress runs for the same ref, matching sast-scan.yml, so rapid pushes don't queue redundant full builds. - netlify.toml skips branch-deploy builds since deploy previews already build every PR commit for the same content.
✅ Deploy Preview for flowforge-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Both changes do what the description says, and the Netlify half is correctly scoped: The concurrency block also cancels runs on concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}That keeps the intended win, deduping pushes to PR branches, which is where the queue cost actually comes from. Related: the "matching sast-scan.yml" framing in the commit message isn't quite equivalent. Two smaller notes:
Worth being explicit in scope: this doesn't touch the two things that actually hurt, the ~100 minute builds when the image cache misses, and the 3-build concurrency cap. Roughly halving builds for branches that have a PR is still a real win, but queue depth on a stacked set remains. Also, both test-plan boxes are still unticked. The Netlify one matters here, because a misconfigured |
|
TL;DR: ship it, with one change.
|
dimitrieh
left a comment
There was a problem hiding this comment.
@ZJvandeWeg see comments above

Summary
test.ymlnow cancels in-progress runs for the same ref (matchingsast-scan.yml), so pushing multiple commits to a PR no longer queues redundant full builds that just get superseded.netlify.tomlskips thebranch-deploybuild context, since deploy previews already build every PR commit — branch deploys were building the same commit a second time.Test plan