Description
Some self-hosted (or otherwise non-github-hosted) runners are non-case-preserving for cache keys. In such configurations, the cache-hit output variable is currently set to false instead of true, even though the case provider did find an exact match (albeit not a case-sensitive one).
For example, in my codeberg-hosted action:
Cache Configuration
Cache Provider:
github
…
Restore Key:
v0-rust-cargodeps-Linux-x64-345d6b90
Cache Key:
v0-rust-cargodeps-Linux-x64-345d6b90-10ea9ea9
.. Prefix:
- v0-rust-cargodeps-Linux-x64
.. Environment considered:
- Rust Version: 1.92.0 x86_64-unknown-linux-gnu (ded5c06cf21d2b93bffd5d884aa6e96934ee4234)
…
... Restoring cache ...
Cache Size: ~157 MB (165006101 B)
[command]/usr/bin/tar -xf /tmp/d6553c1f-2a84-47f5-b618-d056b98a1519/cache.tzst -P -C /workspace/kbriggs/airtouch5 --use-compress-program unzstd
Cache restored successfully
Restored from cache key "v0-rust-cargodeps-linux-x64-345d6b90-10ea9ea9" full match: false.
(note the capital L in the OS name in the generated cache key, verses the lowercase l in the returned match)
Expected behaviour
cache-hit is set to true when the found cache key differs only in case, but is otherwise identical.
Prior art
Description
Some self-hosted (or otherwise non-github-hosted) runners are non-case-preserving for cache keys. In such configurations, the
cache-hitoutput variable is currently set tofalseinstead oftrue, even though the case provider did find an exact match (albeit not a case-sensitive one).For example, in my codeberg-hosted action:
(note the capital
Lin the OS name in the generated cache key, verses the lowercaselin the returned match)Expected behaviour
cache-hitis set totruewhen the found cache key differs only in case, but is otherwise identical.Prior art
A similar issue was reported against the ruby/setup-ruby action, Cache keys are treated as case-sensitive, but case is not preserved in all environments ruby/setup-ruby#659, when using the self-hosted
actrunner, which coerces cache keys to lowercase.The actions/cache action itself uses a case-insensitive match: