Closed jw3 closed 9 months ago
Caching is integrated, after the first mock init you will see time savings until the spec is changed
- uses: jw3/mock-srpm@cache2
with:
chroot: ...
spec: ...
cache: true
If you want to use a prebuilt image it exists
- uses: jw3/mock-srpm@cache2
with:
chroot: ...
spec: ...
cache: true
image: fedora:37
Adds optional caching for the mock package install and the mock chroot.
When the
cache
property is set to 'true' this action may cache both the mock container image and the initialized chroot environment. The caching implementation is opinionated about how and when these get cached.This commit also weaves in custom image support through the 'image' property. When caching while using a custom image, the image will only be cached if mock was not preloaded in the custom image. If mock was preloaded, the image will not be cached, which will result in a slightly faster execution.
The cache key is based off of a hash of the spec file provided to the action. So when the spec file is edited, the cache will be invalidated.
An improved version of #6. More significant time savings in this one.
Closes #2