action-docker-layer-caching
action-docker-layer-caching copied to clipboard
Can't use in a workflow with a comma in its name
Describe the bug You can't use this with a worflow containing a comma in its name.
Debug logs
Run satackey/[email protected]
with:
key: docker-layer-caching-Build, Test & Deploy-{hash}
restore-keys: docker-layer-caching-Build, Test & Deploy-
concurrency: 4
skip-save: false
env:
DOCKER_IMAGE_NAME: ghcr.io/fredagscafeen/web
ValidationError: Key Validation Error: docker-layer-caching-Build, Test & Deploy-{hash} cannot contain commas.
at checkKey (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/main.js/index.js:41761:15)
at Object.<anonymous> (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/main.js/index.js:41784:13)
Error: ValidationError: Key Validation Error: docker-layer-caching-Build, Test & Deploy-{hash} cannot contain commas.
at Generator.next (<anonymous>)
at /home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/main.js/index.js:41718:71
at new Promise (<anonymous>)
at module.exports.692.__awaiter (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/main.js/index.js:41714:12)
at Object.restoreCache (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/main.js/index.js:41774:12)
at LayerCache.restoreRoot (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/main.js/index.js:33245:45)
at LayerCache.restore (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/main.js/index.js:33227:45)
at main (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/main.js/index.js:44116:42) {
name: 'ValidationError'
}
Runner Environment (please complete the following information):
- OS: ubuntu-latest
- Action version: v0.0.8
https://github.com/actions/cache has the same restriction, cache keys can't contain ,
https://github.com/actions/cache has the same restriction, cache keys can't contain
,
Yeah, so this action shouldn't use the workflows name in the key for its cache.
Ah, fair point. actions/cache doesn't set a default key, unlike this action.
Until this is resolved it can be worked around by setting key and restore-keys explicitly.