Closed jonwes closed 1 year ago
We should probably delete old actions caches after a while but they are only ~245 bytes each.
I updated my PR replacing "github.run_id" with "hashFiles('policy.hujson')" in the hash key so we only get a new key when there is a change in the policy file.
I went back to using github.run_id in the cache key. Using a hash of the policy file in the cache key does not work as intended if the policy file is restored to an earlier version. I have pushed an updated version of the file README.md. GitHub will remove any cache entries that have not been accessed in over 7 days so using the cache may not be very helpful if the policy file is updated infrequently.
Thank you for this contribution!
I caught up with this issue today and prepared a PR that included this fix alongside another.
I have updated the workflow in the readme. I have made changes to key and restore-keys in the step "Fetch old version info" in addition to path as suggested by @GingerGeek in #7. If we do not supply a new key on each run the new hash will not be stored since github actions caches are immutable, I think.