Cache: using cache on tags does not work

Created on 27 Mar 2021  路  2Comments  路  Source: actions/cache

hi!

I have a cache created on a non-default branch, all works fine except when the workflow is run on a tag, the cache isn't hit

when it's not a tagged commit, and my github.ref is "...heads" it starts working again.

I guess it's related to https://github.com/actions/cache#cache-scopes

Essentially, it looks like there is no way to use cache in runs on tagged revisions, or is it? (I don't have any caches on my master yet). Is it an intended behavior?

At least, it'd be good if it was described in readme in that "scopes" section.

Most helpful comment

I also have a similar workflow to the one aforementioned by @lwj5 and facing the same problem.

All 2 comments

I'm facing the same problem.

Our YAML

https://github.com/invoiceninja/dockerfiles/blob/1f7458c9f7b86935215b907c0a60f58b436f8785/.github/workflows/build_push.yml

The container is built upon tagged releases, and we cannot retrieve the cache when there is a new release with a new tag.

Is there a way around this? Or can a feature be introduced to rescope the cache?

I also have a similar workflow to the one aforementioned by @lwj5 and facing the same problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wrightak picture wrightak  路  4Comments

jwt27 picture jwt27  路  3Comments

ConorSheehan1 picture ConorSheehan1  路  4Comments

sergeyzwezdin picture sergeyzwezdin  路  5Comments

Lyeeedar picture Lyeeedar  路  5Comments