Do not save cache if files are empty (original) (raw)

Even if the target files are not present or empty, a cache key is saved:

Post job cleanup.
/usr/bin/tar --posix --use-compress-program zstd -T0 -cf cache.tzst -P -C /home/runner/work/boardfish/project --files-from manifest.txt
Cache Size: ~0 MB (22 B)
Cache saved successfully
Cache saved with key: Linux-project-data-17007abbc08...

I'd prefer not to register a key or save a cache in this particular instance.

For now, I'll need to check whether the file exists manually. But I'd rather not have to do that and check against a cache hit instead.