-
Notifications
You must be signed in to change notification settings - Fork 55
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
Caching across runs #169
Comments
So, basically the whole point of this action doesn't even work? Edit: NVM works for me lol xD Edit: Doesn't work for different build types, e.g. cache is not shared between push and PR, even if the PR is for a single commit that was already built. |
I was also surprised to see this. In my case I have a run that is triggered by a regular push, then another one when I tag the version. I was expecting the second to not rebuild docker images but it does 🤷♂️. They are the same commit so I would expect the cache to work in that case. I'm using docker-compose to build my images. Run of the push before tagging it
Run of the tag
|
@satackey 👆 you probably have an idea of what is going on ? |
@andre-lx and @cscetbon it might be due to the keys and restore keys being used. - uses: satackey/[email protected]
with:
key: docker-layer-caching-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}-{hash}
restore-keys: |
docker-layer-caching-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}-{hash}
docker-layer-caching-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
docker-layer-caching-${{ github.workflow }}-${{ github.event_name }}
docker-layer-caching-${{ github.workflow }}
docker-layer-caching- And see if it makes any difference. |
FYI I tried the above and it didn't make a difference |
Describe the bug
Using the following configuration, the cache works great across jobs in the same run (even with the default values of
key
andrestore-keys
, but, re-running the workflow, the cache is never found:Output:
Don't know if it's related with: #49
Because the post step works fine, and again, puts all the layers in cache (and can be used in the next job), but never in the next run.
Expected behavior
The cache can be used across different runs.
Runner Environment:
I am doing something wrong?
Thanks
The text was updated successfully, but these errors were encountered: