Commit b4e2269
committed
Merge #6592: ci: dockerimage multi cache
c3526dc ci: push / cache docker images based on hash too (pasta)
Pull request description:
## Issue being fixed or feature implemented
docker/build-push-action allows us to cache from multiple refs; let's use it!
I've noticed a lot recently when we are changing docker image we get a lot of cache misses we shouldn't. Now we push an image based on the hash of the dockerfile, and restore from that. Additionally, we can now cache from the branch name.
Previously we'd get into situations where:
develop is pushed, build image: HIT
PR opened that changes image, build image: MISS and push
develop is pushed with a different PR, build image: MISS and push
PR has new commit added or rebased, build image: MISS and push
This PR should allow all of these to hit now.
## What was done?
Cache from and push to a tag that is the hash of the dockerfile. Additionally, allow caching from the branch name, or latest if needed.
## How Has This Been Tested?
In my own repo, did a situation similiar to as described above, and got cache hits as expected.
## Breaking Changes
None
## Checklist:
_Go over all the following points, and put an `x` in all the boxes that apply._
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK c3526dc
kwvg:
utACK c3526dc
Tree-SHA512: de66dd37991cf6c0518a13bb648e9547e816b25da33eb80826522eec54ee4c6fe91f64c9c2cb758836cc40b9558d2db48573f5bb234111adc6da176f641e7e1b1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
0 commit comments