-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: cancel in-progress builds on stale PRs
When a pull request is pushed multiple times in sequence (e.g. to fix small errors that are noticed post-submission), a backlog of builds ends up needing to be cleared out before your new update can be built. If you push N times, N builds are queued and need to clear out first. This can cause higher latency for *every* PR since the pool of public runners is shared, and in general seems uneconomical and inefficient since 99% of the time you want to build the new version ASAP. Luckily GHA has a universal solution to this: use the `concurrency` directive to group all builds for a PR under a name, and when a new build appears in that group, cancel all builds in the group that are in-progress. Taken from this useful blog post: "Simple trick to save environment and money when using GitHub Actions" https://turso.tech/blog/simple-trick-to-save-environment-and-money-when-using-github-actions Signed-off-by: Austin Seipp <[email protected]>
- Loading branch information
1 parent
86de913
commit 643d772
Showing
4 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters