Make workflow Docker builds smarter: #11
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.
What
Various changes to the Docker build workflow:
Why
I wanted to make the builds faster and make sure they don't re-download everything every time. Hopefully enabling the GitHub Actions Cache does both.
I also wanted to run builds once a week so that I would know if/when upstream updates break my stuff. I picked Friday afternoons because it feels like the best time: if there's something broken I'd rather it turn into a weekend project 😁
I also didn't like only building on pushes to main and PR activity, because it meant that branch builds wouldn't start until I was done typing up the PR description (or I'd have to open the PR first and then edit to add the description).
Instead, I'm back to building on every push, except now new builds should cancel existing ones if they haven't finished yet.
Testing
Builds take about half as long now (from ~2min to ~1min). I'd love to get this number down even lower but I'm not sure I can. At least not now...