actions / toolkit

The GitHub ToolKit for developing GitHub Actions.
https://github.com/features/actions
MIT License
5.02k stars 1.45k forks source link

Add option to overwrite files on cache extraction #1704

Closed siburny closed 5 months ago

siburny commented 7 months ago

When using GNU tar, if a file already exists, from a previous run or another cached action, it results in a slew of warning messages.

This change adds the use of --overwrite when using GNU tar so that any existing file will just be overwritten.

Similar issue was fixed in the @actions/tool-cache package, but not in @actions/cache: https://github.com/actions/toolkit/pull/807/files#diff-725a5ef102ee3762738a5500c3d7c5b6afef874a1cb67c55085ad5e4615b1a6f