feat(cache): support passing extra tar args
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, andextractare 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
@robherley, @bethanyj28, please review
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.
+1 this would allow a targeted workaround for issue #1753