Skip to content

Attempt to delete the archive after extraction#209

Merged
joshmgross merged 1 commit intoactions:masterfrom
henrymercer:delete-archive-after-extraction
Mar 18, 2020
Merged

Attempt to delete the archive after extraction#209
joshmgross merged 1 commit intoactions:masterfrom
henrymercer:delete-archive-after-extraction

Conversation

@henrymercer
Copy link
Copy Markdown
Contributor

This PR modifies the restore job to attempt to delete the downloaded archive once it has been extracted. This reduces storage space used on the Actions runner once the cache Action has finished executing.

This change is particularly useful for users using a large proportion of the 5GB of currently available cache space, as keeping both the archives and the unzipped content could use close to 10GB of the available 14GB of storage on GitHub-hosted Actions runners.

This reduces storage space used once the Action has finished executing.
const cacheEntry = yield cacheHttpClient.getCacheEntry(keys);
if (!((_a = cacheEntry) === null || _a === void 0 ? void 0 : _a.archiveLocation)) {
core.info(`Cache not found for input keys: ${keys.join(", ")}.`);
core.info(`Cache not found for input keys: ${keys.join(", ")}`);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this change was originally made in #195 but the Action wasn't recompiled.

Copy link
Copy Markdown
Contributor

@joshmgross joshmgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@joshmgross joshmgross merged commit cae64ca into actions:master Mar 18, 2020
@henrymercer henrymercer deleted the delete-archive-after-extraction branch March 18, 2020 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants