mirror of
https://github.com/actions/cache.git
synced 2025-07-10 21:00:46 +00:00
Cache multiple entries using --files-from tar input
remove known failing test Quote tar paths Add salt to test cache Try reading input files from manifest bump salt Run test on macos more testing Run caching tests on 3 platforms Run tests on self-hosted Apparently cant reference hosted runners by name Bump salt wait for some time after save more timing out smarter waiting Cache in tmp dir that won't be deleted Use child_process instead of actions/exec Revert tempDir hack bump salt more logging More console logging Use filepath to with cacheHttpClient Test cache restoration Revert temp dir hack debug logging clean up cache.yml testing Bump salt change debug output build actions
This commit is contained in:
parent
db235cfc56
commit
e0d1942524
11 changed files with 157 additions and 80 deletions
12
src/save.ts
12
src/save.ts
|
@ -1,7 +1,7 @@
|
|||
import * as core from "@actions/core";
|
||||
import * as path from "path";
|
||||
import * as cacheHttpClient from "./cacheHttpClient";
|
||||
import { Events, Inputs, State } from "./constants";
|
||||
import { Events, Inputs, State, CacheFilename } from "./constants";
|
||||
import { createTar } from "./tar";
|
||||
import * as utils from "./utils/actionUtils";
|
||||
|
||||
|
@ -43,7 +43,7 @@ async function run(): Promise<void> {
|
|||
return;
|
||||
}
|
||||
core.debug(`Cache ID: ${cacheId}`);
|
||||
const cachePaths = await utils.expandPaths(
|
||||
const cachePaths = await utils.resolvePaths(
|
||||
core
|
||||
.getInput(Inputs.Path)
|
||||
.split("\n")
|
||||
|
@ -53,13 +53,11 @@ async function run(): Promise<void> {
|
|||
core.debug("Cache Paths:");
|
||||
core.debug(`${JSON.stringify(cachePaths)}`);
|
||||
|
||||
const archivePath = path.join(
|
||||
await utils.createTempDirectory(),
|
||||
"cache.tgz"
|
||||
);
|
||||
const archiveFolder = await utils.createTempDirectory();
|
||||
const archivePath = path.join(archiveFolder, CacheFilename);
|
||||
core.debug(`Archive Path: ${archivePath}`);
|
||||
|
||||
await createTar(archivePath, cachePaths);
|
||||
await createTar(archiveFolder, cachePaths);
|
||||
|
||||
const fileSizeLimit = 5 * 1024 * 1024 * 1024; // 5GB per repo limit
|
||||
const archiveFileSize = utils.getArchiveFileSize(archivePath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue