I have a workflow on a monorepo that has multiple package.json files. the cache key looks something like this:
- restore_cache:
keys:
- some-prefix-{{ checksum "package-lock.json" }}-{{
checksum "apps/app1/package-lock.json" }}-{{
checksum "apps/app2/functions/package-lock.json" }}
this cache key appears many times in my config.yml file.
I’m wondering if it’s possible to declare the cache key in one location and save it as a variable, and then referencing it in multiple locations. Something like this:
- restore_cache:
keys:
- << my-saved-cache-key >>
Is this possible, and what what would be the syntax? Any references do documentation for declaring a local variable like this would be helpful. Thanks!