actions / cache

Cache dependencies and build outputs in GitHub Actions
MIT License
4.37k stars 1.16k forks source link

Add --remove-files on tarball creation #1282

Open jlanga opened 7 months ago

jlanga commented 7 months ago

Add --remove-files on tarball creation

Description

Just added --remove-files flag to tar on the save section. This flag removes files on the fly as they are being added to the tarball.

Motivation and Context

When the cache size is too big, the elements to be cached and the tar.gz coexist at the same time, filling the disk space, and failing to produce an object.

This PR solves #1281 .

How Has This Been Tested?

By using tar on a linux machine. I created a folder and mock files, and after running tar, the folder and the files weren't there.

I ran npm run test and it passed.

Screenshots (if appropriate):

Types of changes

Checklist:

jlanga commented 2 months ago

@bethanyj28 review please?