chore(ci): improve queue by canceling jobs #641
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Yesterday I noticed when I made a typo, and pushed a commit into my PR, the actions keep on running. Which make no sense when there is a new commit, and with 28 images builds per commit, the queue would be pretty full after a few commits. Building stuff that doesn't matter anymore.
I've found the following documentation and tried to implement it on my personal fork to see if this would work.
https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
It did work perfect, so I would like to try it out here. If this works good here, it would definitely something to implement for other repo's building a lot of images to keep the queue clean.
Hope it works out as intended here, it would be a big improved. If not well, we can revert this PR.