Error annotations from cache post-run step
Nemo157 opened this issue · 2 comments
In https://github.com/Nullus157/.github/actions/runs/5048663303 I'm seeing a bunch of error annotations:
Error: ENOENT: no such file or directory, opendir '/home/runner/.cargo/registry/index'
stepping into one of the jobs these are coming from the post-run action when it goes to clean the registry before caching, presumably because I have no dependencies so no registry data is downloaded https://github.com/Nullus157/.github/actions/runs/5048663303/jobs/9057129303#step:7:31
Thanks for the information. Indeed, there is a problem with https://github.com/Swatinem/rust-cache. rust-cache
is the only part of this action with post-run steps. This minimal action with a Rust project without dependencies is enough to trigger the error:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo check --all
You can disable the cache action by setting the cache
input value to false
:
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
For a proper fix, you should raise the issue again in the rust-cache
repository.
Thanks for taking a look, I've opened Swatinem/rust-cache#144 about it. I can't easily disable the cache here because I share this workflow between multiple repositories, but it doesn't actually cause a failure so it's not a massive deal to ignore for now.