You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue has been fixed and released in v3.0.3
Cache action will now check if at least one path/file/folder exists for the given path in the action. If nothing is found, no cache will be saved.
Note: We are not checking for the size as the compressed tar/zip might still be a few bytes in size. So it is not possible to tell if the cache is empty or not just by the size of the compressed file.
Now that the lookup-only parameter has been added, the drawback of not saving empty caches is that it forces you to create an empty file if you just want to cache whether something has happened. For example, when vendoring dependencies, such as with Yarn Zero-installs, it's important to check the correctness of committed dependencies against the package registry, but this only needs to be done once per dependency bump.
Activity
PaulRBerg commentedon Aug 17, 2021
Yes it would be great if we could disable the saving of cache in this circumstance.
This issue seems related to #489 though.
github-actions commentedon May 5, 2022
This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.
cderv commentedon May 5, 2022
I would still like to this possible.
kotewar commentedon May 31, 2022
The issue has been fixed and released in v3.0.3
Cache action will now check if at least one path/file/folder exists for the given
pathin the action. If nothing is found, no cache will be saved.Kurt-von-Laven commentedon Sep 17, 2023
Now that the
lookup-onlyparameter has been added, the drawback of not saving empty caches is that it forces you to create an empty file if you just want to cache whether something has happened. For example, when vendoring dependencies, such as with Yarn Zero-installs, it's important to check the correctness of committed dependencies against the package registry, but this only needs to be done once per dependency bump.