Comments (6)
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.
from action-docker-layer-caching.
Found a fix:
with:
key: docker-layer-cache-{hash}
restore-keys: |
docker-layer-cache-
layer-docker-layer-cache-
Turns out that layers are saved with a layer-
prefix (see here) that isn't used during cache restoration (see here).
from action-docker-layer-caching.
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
with:
key: docker-layer-caching-SATTL-{hash}
restore-keys: docker-layer-caching-SATTL-
concurrency: 4
skip-save: false
env:
AWS_DEFAULT_REGION: us-west-2
AWS_REGION: us-west-2
AWS_ACCESS_KEY_ID: ***
AWS_SECRET_ACCESS_KEY: ***
Received 10853 of 10853 (100.0%), 0.2 MBs/sec
...
Cache saved successfully
119
Stored layer cache: {"key":"layer-docker-layer-caching-SATTL-f0ef9365e55bcbec8d3ee03a24ee9f410a784f1b5e42c358c399f0cdcdb030f9","cacheId":57}
Run of the tag
with:
key: docker-layer-caching-SATTL-{hash}
restore-keys: docker-layer-caching-SATTL-
concurrency: 4
skip-save: false
env:
AWS_DEFAULT_REGION: us-west-2
AWS_REGION: us-west-2
AWS_ACCESS_KEY_ID: **
AWS_SECRET_ACCESS_KEY: **
Root cache could not be found. aborting.
from action-docker-layer-caching.
@satackey 👆 you probably have an idea of what is going on ?
from action-docker-layer-caching.
@andre-lx and @cscetbon it might be due to the keys and restore keys being used.
Try this:
- 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.
from action-docker-layer-caching.
FYI I tried the above and it didn't make a difference
from action-docker-layer-caching.
Related Issues (20)
- Does it remove discarded layers from cache? [Question] HOT 1
- ReserveCacheError: Unable to reserve cache with key HOT 6
- docker load is slow
- Cache not wotking with BuildKit HOT 3
- Add a filter parameter - to select for the images to cache HOT 15
- Upgrade actions/cache to v2. HOT 6
- Abla to skip saving cache on condition HOT 1
- Feature Request: Alternative, larger cache disk space HOT 2
- Cannot set concurrency
- [Security] Workflow release.yml is using vulnerable action satackey/push-prebuilt-action
- [Security] Workflow release.yml is using vulnerable action satackey/push-prebuilt-action HOT 1
- Rinning with the caching Slower then without a cache HOT 3
- GITHUB_TOKEN permissions used by this action
- getCacheEntry failed: Cache service responded with 503
- quiet mode
- Increases pipeline times instead of decreasing it HOT 3
- Use Node 16 instead of 12 HOT 4
- NEW FORK HOT 2
- Warning: The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-docker-layer-caching.