Hi,
Would be possible to expose a CIRCLE_PREVIOUS_WORKFLOW_ID
as an environment variable in a similar way you already do with CIRCLE_PREVIOUS_BUILD_NUM
?
We want to use it in the cache key for our elixir compiled binaries.
The cache example in the Language Guides: Elixir is so good since it will keep a too outdated version of the compile binaries in the cache and, as we add more and more changes to the codebase, it requires to compile almost everything again.
We would like to do something like this:
steps:
- restore_cache:
keys:
- build-cache-{{ .Branch }}-prod-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }}
- build-cache-prod
- run: mix compile
- save_cache:
key: build-cache-{{ .Branch }}-prod-{{ .BuildNum }}
paths: "_build"
- save_cache:
key: build-cache-prod
paths: "_build"
Regards,
Hugo