toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

feat(cache): support passing extra tar args

Open deemp opened this issue 1 year ago • 4 comments

Usecase

In cache-nix-action, I exclude some files when restoring a cache (link).

Security

IDK if this change can introduce potential vulnerabilities.

TODO

  • [ ] Insert arguments in the correct places. Some arguments of create, list, and extract are positional. Hence, extra arguments should be inserted into right places when invoking these commands. E.g., before '--files-from' in 'create'

    https://github.com/actions/toolkit/blob/8780507298eb66f677ace2cadf09e1c2f5559661/packages/cache/src/internal/tar.ts#L86

Other PRs about tar

  • https://github.com/actions/toolkit/pull/1704
  • https://github.com/actions/cache/pull/1282

deemp avatar Apr 02 '24 20:04 deemp

@robherley, @bethanyj28, please review

deemp avatar Apr 06 '24 06:04 deemp

As a user of cache-nix-action using an alternative cache, having this merged in the official cache would be super useful for us as well.

jgoux avatar Apr 23 '24 05:04 jgoux

+1 this would allow a targeted workaround for issue #1753

mikehearn avatar Jun 09 '24 15:06 mikehearn