setup-rust-toolchain icon indicating copy to clipboard operation
setup-rust-toolchain copied to clipboard

Add support for adding to cache key

Open iainlane opened this issue 7 months ago • 2 comments

When using this action in multiple matrix jobs in the same workflow, the generated cache key is the same for all of them, because they all get the same job ID. This means that all apart from the first job are unable to save the cache, and subsequent runs might restore the wrong cache.

The Swatinem/rust-cache action which we use for caching has a key input which it puts in its cache key. (It doesn't override the key, just adds to it.) Providing this as an input here will allow us to generate a unique cache key for each job in the matrix.

iainlane avatar Jul 12 '24 07:07 iainlane