actions / cache

Cache dependencies and build outputs in GitHub Actions
MIT License
4.57k stars 1.21k forks source link

Need a way for caching to be for entire repo; not scoped to per-branch builds #1175

Open ste00martin opened 1 year ago

ste00martin commented 1 year ago

We exclusively use git tags for mobile releases, and due to the nature of tags we never gain the performance of caching because each tag is treated as a separate branch even when the tag is within the same branch.

The ask is to have an option to disable scoping caching on a per-branch basis and have the cache be for the entire shared repository - the developer would have the power to cache bust by using the cache key alone without any extra rules with this feature.

smil2k commented 1 year ago

@ste00martin I also wondered about having "global" cache. I definitely love to see it, I always saw it as kind of strange. As far as I know it had some security implications.

Danand commented 1 year ago

Second that!
Almost all of my workflows triggers on push of tag, so there is no performance gain, even the most of tags belong to the same branch main Actions cache is great feature, but ref scope is just really annoying thing now.

pauldraper commented 1 year ago

I don't understand why it was designed this way....there is a cache key.

If users wanted their caches scoped by branch, or tag, or commit hash, they would include that in the cache key.

stanislas commented 1 year ago

Can someone explain to me the security risk? I strictly only cache dependencies and the key is computed from the dependency information. All is deterministic. So I do not understand the security problem.

Update: I understand now: https://github.com/actions/cache/issues/79#issuecomment-552559765

github-actions[bot] commented 5 months ago

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.

mjperrone commented 5 months ago

I am still interested in support for something like this.

cgrente commented 3 months ago

still interested by the support of cache between tags