New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache not being hit when using TAG workflows #96
Comments
@Nithos This is the expected behavior when using
Your workflow will only push cache for tags and not the branch itself. Therefore when creating a new tag from this branch it doesn't have any cache available. TLDR; You need to trigger the workflow for the branch that tags will point to (I guess the default one) like:
As I can see in your workflow, image is built only when tags are pushed. You might need to adapt it to build but not push the image for a git push event on this branch. There are some workflows out there with this kind of pattern like:
More info about GitHub scoped cache: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache |
Ah okay I appreciate the update. We do on occasion tag on feature branches (demos etc...) and in that case I guess it should be infrequent enough that the cache hit is not as critical. |
Yes that's it |
Thank you. |
Let me know if it works on your side, thx |
Behaviour
When using a workflow that triggers on a TAG it fails to hit the cache when triggering the workflow with a follow on version tag.
Removing the tag and deploying again does hit the cache correctly however.
This is similar/same to the issue currently found in the
build_pull_action
hereExpected behaviour
Actual behaviour
Configuration
Sample Workflow
The text was updated successfully, but these errors were encountered: