mirror of
https://github.com/actions/cache.git
synced 2025-12-18 12:08:36 +08:00
add compression-level inputs
This commit is contained in:
parent
9255dc7a25
commit
6018dbe2dc
|
|
@ -87,6 +87,7 @@ If you are using a `self-hosted` Windows runner, `GNU tar` and `zstd` are requir
|
||||||
* `key` - An explicit key for a cache entry. See [creating a cache key](#creating-a-cache-key).
|
* `key` - An explicit key for a cache entry. See [creating a cache key](#creating-a-cache-key).
|
||||||
* `path` - A list of files, directories, and wildcard patterns to cache and restore. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns.
|
* `path` - A list of files, directories, and wildcard patterns to cache and restore. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns.
|
||||||
* `restore-keys` - An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key.
|
* `restore-keys` - An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key.
|
||||||
|
* `compression-level` - Compression level to use when creating cache archives. Use `0` for no compression and `9` for maximum compression. Defaults to the compression tool's standard level when unset.
|
||||||
* `enableCrossOsArchive` - An optional boolean when enabled, allows Windows runners to save or restore caches that can be restored or saved respectively on other platforms. Default: `false`
|
* `enableCrossOsArchive` - An optional boolean when enabled, allows Windows runners to save or restore caches that can be restored or saved respectively on other platforms. Default: `false`
|
||||||
* `fail-on-cache-miss` - Fail the workflow if cache entry is not found. Default: `false`
|
* `fail-on-cache-miss` - Fail the workflow if cache entry is not found. Default: `false`
|
||||||
* `lookup-only` - If true, only checks if cache entry exists and skips download. Does not change save cache behavior. Default: `false`
|
* `lookup-only` - If true, only checks if cache entry exists and skips download. Does not change save cache behavior. Default: `false`
|
||||||
|
|
@ -359,7 +360,7 @@ We are taking the following steps to better direct requests related to GitHub Ac
|
||||||
|
|
||||||
1. We will be directing questions and support requests to our [Community Discussions area](https://github.com/orgs/community/discussions/categories/actions)
|
1. We will be directing questions and support requests to our [Community Discussions area](https://github.com/orgs/community/discussions/categories/actions)
|
||||||
|
|
||||||
2. High Priority bugs can be reported through Community Discussions or you can report these to our support team https://support.github.com/contact/bug-report.
|
2. High Priority bugs can be reported through Community Discussions or you can report these to our support team <https://support.github.com/contact/bug-report>.
|
||||||
|
|
||||||
3. Security Issues should be handled as per our [security.md](SECURITY.md).
|
3. Security Issues should be handled as per our [security.md](SECURITY.md).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import * as cache from "@actions/cache";
|
import * as cache from "@actions/cache";
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
|
import * as zlib from "zlib";
|
||||||
|
|
||||||
import { Events, RefKey } from "../src/constants";
|
import { Events, RefKey } from "../src/constants";
|
||||||
import * as actionUtils from "../src/utils/actionUtils";
|
import * as actionUtils from "../src/utils/actionUtils";
|
||||||
|
|
@ -24,6 +25,11 @@ beforeEach(() => {
|
||||||
delete process.env[RefKey];
|
delete process.env[RefKey];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
delete process.env["ZSTD_CLEVEL"];
|
||||||
|
delete process.env["GZIP"];
|
||||||
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
process.env = pristineEnv;
|
process.env = pristineEnv;
|
||||||
});
|
});
|
||||||
|
|
@ -177,6 +183,51 @@ test("getInputAsInt returns undefined if input is invalid or NaN", () => {
|
||||||
expect(actionUtils.getInputAsInt("foo")).toBeUndefined();
|
expect(actionUtils.getInputAsInt("foo")).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("getCompressionLevel returns undefined if input not set", () => {
|
||||||
|
expect(actionUtils.getCompressionLevel("undefined")).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("getCompressionLevel returns value if input is valid", () => {
|
||||||
|
testUtils.setInput("foo", "9");
|
||||||
|
expect(actionUtils.getCompressionLevel("foo")).toBe(9);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("getCompressionLevel allows zero for no compression", () => {
|
||||||
|
testUtils.setInput("foo", "0");
|
||||||
|
expect(actionUtils.getCompressionLevel("foo")).toBe(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("getCompressionLevel returns undefined and warns if input is too large", () => {
|
||||||
|
const infoMock = jest.spyOn(core, "info");
|
||||||
|
testUtils.setInput("foo", "11");
|
||||||
|
expect(actionUtils.getCompressionLevel("foo")).toBeUndefined();
|
||||||
|
expect(infoMock).toHaveBeenCalledWith(
|
||||||
|
"[warning]Invalid compression-level provided: 11. Expected a value between 0 (no compression) and 9 (maximum compression)."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("setCompressionLevel sets compression env vars", () => {
|
||||||
|
actionUtils.setCompressionLevel(7);
|
||||||
|
expect(process.env["ZSTD_CLEVEL"]).toBe("7");
|
||||||
|
expect(process.env["GZIP"]).toBe("-7");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("setCompressionLevel sets no-compression flag when zero", () => {
|
||||||
|
actionUtils.setCompressionLevel(0);
|
||||||
|
expect(process.env["ZSTD_CLEVEL"]).toBe("0");
|
||||||
|
expect(process.env["GZIP"]).toBe("-0");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("higher compression level produces smaller gzip output", () => {
|
||||||
|
const data = Buffer.alloc(8 * 1024, "A");
|
||||||
|
|
||||||
|
const level0 = zlib.gzipSync(data, { level: 0 });
|
||||||
|
const level9 = zlib.gzipSync(data, { level: 9 });
|
||||||
|
|
||||||
|
expect(level0.byteLength).toBeGreaterThan(level9.byteLength);
|
||||||
|
expect(level0.byteLength - level9.byteLength).toBeGreaterThan(1000);
|
||||||
|
});
|
||||||
|
|
||||||
test("getInputAsInt throws if required and value missing", () => {
|
test("getInputAsInt throws if required and value missing", () => {
|
||||||
expect(() =>
|
expect(() =>
|
||||||
actionUtils.getInputAsInt("undefined", { required: true })
|
actionUtils.getInputAsInt("undefined", { required: true })
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,22 @@ beforeAll(() => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
jest.spyOn(actionUtils, "getCompressionLevel").mockImplementation(
|
||||||
|
(name, options) => {
|
||||||
|
return jest
|
||||||
|
.requireActual("../src/utils/actionUtils")
|
||||||
|
.getCompressionLevel(name, options);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
jest.spyOn(actionUtils, "setCompressionLevel").mockImplementation(
|
||||||
|
compressionLevel => {
|
||||||
|
return jest
|
||||||
|
.requireActual("../src/utils/actionUtils")
|
||||||
|
.setCompressionLevel(compressionLevel);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
jest.spyOn(actionUtils, "isExactKeyMatch").mockImplementation(
|
jest.spyOn(actionUtils, "isExactKeyMatch").mockImplementation(
|
||||||
(key, cacheResult) => {
|
(key, cacheResult) => {
|
||||||
return jest
|
return jest
|
||||||
|
|
@ -71,6 +87,8 @@ afterEach(() => {
|
||||||
testUtils.clearInputs();
|
testUtils.clearInputs();
|
||||||
delete process.env[Events.Key];
|
delete process.env[Events.Key];
|
||||||
delete process.env[RefKey];
|
delete process.env[RefKey];
|
||||||
|
delete process.env["ZSTD_CLEVEL"];
|
||||||
|
delete process.env["GZIP"];
|
||||||
});
|
});
|
||||||
|
|
||||||
test("save with valid inputs uploads a cache", async () => {
|
test("save with valid inputs uploads a cache", async () => {
|
||||||
|
|
@ -92,6 +110,7 @@ test("save with valid inputs uploads a cache", async () => {
|
||||||
const inputPath = "node_modules";
|
const inputPath = "node_modules";
|
||||||
testUtils.setInput(Inputs.Path, inputPath);
|
testUtils.setInput(Inputs.Path, inputPath);
|
||||||
testUtils.setInput(Inputs.UploadChunkSize, "4000000");
|
testUtils.setInput(Inputs.UploadChunkSize, "4000000");
|
||||||
|
testUtils.setInput(Inputs.CompressionLevel, "8");
|
||||||
|
|
||||||
const cacheId = 4;
|
const cacheId = 4;
|
||||||
const saveCacheMock = jest
|
const saveCacheMock = jest
|
||||||
|
|
@ -102,6 +121,9 @@ test("save with valid inputs uploads a cache", async () => {
|
||||||
|
|
||||||
await saveRun();
|
await saveRun();
|
||||||
|
|
||||||
|
expect(process.env["ZSTD_CLEVEL"]).toBe("8");
|
||||||
|
expect(process.env["GZIP"]).toBe("-8");
|
||||||
|
|
||||||
expect(saveCacheMock).toHaveBeenCalledTimes(1);
|
expect(saveCacheMock).toHaveBeenCalledTimes(1);
|
||||||
expect(saveCacheMock).toHaveBeenCalledWith(
|
expect(saveCacheMock).toHaveBeenCalledWith(
|
||||||
[inputPath],
|
[inputPath],
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,22 @@ beforeAll(() => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
jest.spyOn(actionUtils, "getCompressionLevel").mockImplementation(
|
||||||
|
(name, options) => {
|
||||||
|
return jest
|
||||||
|
.requireActual("../src/utils/actionUtils")
|
||||||
|
.getCompressionLevel(name, options);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
jest.spyOn(actionUtils, "setCompressionLevel").mockImplementation(
|
||||||
|
compressionLevel => {
|
||||||
|
return jest
|
||||||
|
.requireActual("../src/utils/actionUtils")
|
||||||
|
.setCompressionLevel(compressionLevel);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
jest.spyOn(actionUtils, "isExactKeyMatch").mockImplementation(
|
jest.spyOn(actionUtils, "isExactKeyMatch").mockImplementation(
|
||||||
(key, cacheResult) => {
|
(key, cacheResult) => {
|
||||||
return jest
|
return jest
|
||||||
|
|
@ -69,6 +85,8 @@ afterEach(() => {
|
||||||
testUtils.clearInputs();
|
testUtils.clearInputs();
|
||||||
delete process.env[Events.Key];
|
delete process.env[Events.Key];
|
||||||
delete process.env[RefKey];
|
delete process.env[RefKey];
|
||||||
|
delete process.env["ZSTD_CLEVEL"];
|
||||||
|
delete process.env["GZIP"];
|
||||||
});
|
});
|
||||||
|
|
||||||
test("save with invalid event outputs warning", async () => {
|
test("save with invalid event outputs warning", async () => {
|
||||||
|
|
@ -406,3 +424,97 @@ test("save with valid inputs uploads a cache", async () => {
|
||||||
|
|
||||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("save applies compression level when provided", async () => {
|
||||||
|
const failedMock = jest.spyOn(core, "setFailed");
|
||||||
|
|
||||||
|
const primaryKey = "Linux-node-bb828da54c148048dd17899ba9fda624811cfb43";
|
||||||
|
const savedCacheKey = "Linux-node-";
|
||||||
|
|
||||||
|
jest.spyOn(core, "getState")
|
||||||
|
// Cache Entry State
|
||||||
|
.mockImplementationOnce(() => {
|
||||||
|
return savedCacheKey;
|
||||||
|
})
|
||||||
|
// Cache Key State
|
||||||
|
.mockImplementationOnce(() => {
|
||||||
|
return primaryKey;
|
||||||
|
});
|
||||||
|
|
||||||
|
const inputPath = "node_modules";
|
||||||
|
testUtils.setInput(Inputs.Path, inputPath);
|
||||||
|
testUtils.setInput(Inputs.UploadChunkSize, "4000000");
|
||||||
|
testUtils.setInput(Inputs.CompressionLevel, "9");
|
||||||
|
|
||||||
|
const cacheId = 4;
|
||||||
|
const saveCacheMock = jest
|
||||||
|
.spyOn(cache, "saveCache")
|
||||||
|
.mockImplementationOnce(() => {
|
||||||
|
return Promise.resolve(cacheId);
|
||||||
|
});
|
||||||
|
|
||||||
|
await saveImpl(new StateProvider());
|
||||||
|
|
||||||
|
expect(process.env["ZSTD_CLEVEL"]).toBe("9");
|
||||||
|
expect(process.env["GZIP"]).toBe("-9");
|
||||||
|
|
||||||
|
expect(saveCacheMock).toHaveBeenCalledTimes(1);
|
||||||
|
expect(saveCacheMock).toHaveBeenCalledWith(
|
||||||
|
[inputPath],
|
||||||
|
primaryKey,
|
||||||
|
{
|
||||||
|
uploadChunkSize: 4000000
|
||||||
|
},
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("save skips setting compression when value is out of range", async () => {
|
||||||
|
const failedMock = jest.spyOn(core, "setFailed");
|
||||||
|
const setCompressionLevelMock = jest.spyOn(actionUtils, "setCompressionLevel");
|
||||||
|
|
||||||
|
const primaryKey = "Linux-node-bb828da54c148048dd17899ba9fda624811cfb43";
|
||||||
|
const savedCacheKey = "Linux-node-";
|
||||||
|
|
||||||
|
jest.spyOn(core, "getState")
|
||||||
|
// Cache Entry State
|
||||||
|
.mockImplementationOnce(() => {
|
||||||
|
return savedCacheKey;
|
||||||
|
})
|
||||||
|
// Cache Key State
|
||||||
|
.mockImplementationOnce(() => {
|
||||||
|
return primaryKey;
|
||||||
|
});
|
||||||
|
|
||||||
|
const inputPath = "node_modules";
|
||||||
|
testUtils.setInput(Inputs.Path, inputPath);
|
||||||
|
testUtils.setInput(Inputs.UploadChunkSize, "4000000");
|
||||||
|
testUtils.setInput(Inputs.CompressionLevel, "99");
|
||||||
|
|
||||||
|
const cacheId = 4;
|
||||||
|
const saveCacheMock = jest
|
||||||
|
.spyOn(cache, "saveCache")
|
||||||
|
.mockImplementationOnce(() => {
|
||||||
|
return Promise.resolve(cacheId);
|
||||||
|
});
|
||||||
|
|
||||||
|
await saveImpl(new StateProvider());
|
||||||
|
|
||||||
|
expect(process.env["ZSTD_CLEVEL"]).toBeUndefined();
|
||||||
|
expect(process.env["GZIP"]).toBeUndefined();
|
||||||
|
expect(setCompressionLevelMock).not.toHaveBeenCalled();
|
||||||
|
|
||||||
|
expect(saveCacheMock).toHaveBeenCalledTimes(1);
|
||||||
|
expect(saveCacheMock).toHaveBeenCalledWith(
|
||||||
|
[inputPath],
|
||||||
|
primaryKey,
|
||||||
|
{
|
||||||
|
uploadChunkSize: 4000000
|
||||||
|
},
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,22 @@ beforeAll(() => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
jest.spyOn(actionUtils, "getCompressionLevel").mockImplementation(
|
||||||
|
(name, options) => {
|
||||||
|
return jest
|
||||||
|
.requireActual("../src/utils/actionUtils")
|
||||||
|
.getCompressionLevel(name, options);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
jest.spyOn(actionUtils, "setCompressionLevel").mockImplementation(
|
||||||
|
compressionLevel => {
|
||||||
|
return jest
|
||||||
|
.requireActual("../src/utils/actionUtils")
|
||||||
|
.setCompressionLevel(compressionLevel);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
jest.spyOn(actionUtils, "isExactKeyMatch").mockImplementation(
|
jest.spyOn(actionUtils, "isExactKeyMatch").mockImplementation(
|
||||||
(key, cacheResult) => {
|
(key, cacheResult) => {
|
||||||
return jest
|
return jest
|
||||||
|
|
@ -71,6 +87,8 @@ afterEach(() => {
|
||||||
testUtils.clearInputs();
|
testUtils.clearInputs();
|
||||||
delete process.env[Events.Key];
|
delete process.env[Events.Key];
|
||||||
delete process.env[RefKey];
|
delete process.env[RefKey];
|
||||||
|
delete process.env["ZSTD_CLEVEL"];
|
||||||
|
delete process.env["GZIP"];
|
||||||
});
|
});
|
||||||
|
|
||||||
test("save with valid inputs uploads a cache", async () => {
|
test("save with valid inputs uploads a cache", async () => {
|
||||||
|
|
@ -82,6 +100,7 @@ test("save with valid inputs uploads a cache", async () => {
|
||||||
testUtils.setInput(Inputs.Key, primaryKey);
|
testUtils.setInput(Inputs.Key, primaryKey);
|
||||||
testUtils.setInput(Inputs.Path, inputPath);
|
testUtils.setInput(Inputs.Path, inputPath);
|
||||||
testUtils.setInput(Inputs.UploadChunkSize, "4000000");
|
testUtils.setInput(Inputs.UploadChunkSize, "4000000");
|
||||||
|
testUtils.setInput(Inputs.CompressionLevel, "0");
|
||||||
|
|
||||||
const cacheId = 4;
|
const cacheId = 4;
|
||||||
const saveCacheMock = jest
|
const saveCacheMock = jest
|
||||||
|
|
@ -92,6 +111,9 @@ test("save with valid inputs uploads a cache", async () => {
|
||||||
|
|
||||||
await saveOnlyRun();
|
await saveOnlyRun();
|
||||||
|
|
||||||
|
expect(process.env["ZSTD_CLEVEL"]).toBe("0");
|
||||||
|
expect(process.env["GZIP"]).toBe("-0");
|
||||||
|
|
||||||
expect(saveCacheMock).toHaveBeenCalledTimes(1);
|
expect(saveCacheMock).toHaveBeenCalledTimes(1);
|
||||||
expect(saveCacheMock).toHaveBeenCalledWith(
|
expect(saveCacheMock).toHaveBeenCalledWith(
|
||||||
[inputPath],
|
[inputPath],
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@ inputs:
|
||||||
upload-chunk-size:
|
upload-chunk-size:
|
||||||
description: 'The chunk size used to split up large files during upload, in bytes'
|
description: 'The chunk size used to split up large files during upload, in bytes'
|
||||||
required: false
|
required: false
|
||||||
|
compression-level:
|
||||||
|
description: 'Compression level used when creating cache archives. Set 0 for no compression and 9 for maximum compression. Defaults to the compression tool defaults when unset'
|
||||||
|
required: false
|
||||||
enableCrossOsArchive:
|
enableCrossOsArchive:
|
||||||
description: 'An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms'
|
description: 'An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms'
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
|
|
||||||
307
dist/restore-only/index.js
vendored
307
dist/restore-only/index.js
vendored
|
|
@ -44019,6 +44019,7 @@ var Inputs;
|
||||||
Inputs["Path"] = "path";
|
Inputs["Path"] = "path";
|
||||||
Inputs["RestoreKeys"] = "restore-keys";
|
Inputs["RestoreKeys"] = "restore-keys";
|
||||||
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
||||||
|
Inputs["CompressionLevel"] = "compression-level";
|
||||||
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
||||||
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
|
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
|
||||||
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
||||||
|
|
@ -44312,6 +44313,8 @@ exports.logWarning = logWarning;
|
||||||
exports.isValidEvent = isValidEvent;
|
exports.isValidEvent = isValidEvent;
|
||||||
exports.getInputAsArray = getInputAsArray;
|
exports.getInputAsArray = getInputAsArray;
|
||||||
exports.getInputAsInt = getInputAsInt;
|
exports.getInputAsInt = getInputAsInt;
|
||||||
|
exports.getCompressionLevel = getCompressionLevel;
|
||||||
|
exports.setCompressionLevel = setCompressionLevel;
|
||||||
exports.getInputAsBool = getInputAsBool;
|
exports.getInputAsBool = getInputAsBool;
|
||||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
||||||
const cache = __importStar(__nccwpck_require__(5116));
|
const cache = __importStar(__nccwpck_require__(5116));
|
||||||
|
|
@ -44354,6 +44357,22 @@ function getInputAsInt(name, options) {
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
function getCompressionLevel(name, options) {
|
||||||
|
const compressionLevel = getInputAsInt(name, options);
|
||||||
|
if (compressionLevel === undefined) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
if (compressionLevel > 9) {
|
||||||
|
logWarning(`Invalid compression-level provided: ${compressionLevel}. Expected a value between 0 (no compression) and 9 (maximum compression).`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return compressionLevel;
|
||||||
|
}
|
||||||
|
function setCompressionLevel(compressionLevel) {
|
||||||
|
const level = compressionLevel.toString();
|
||||||
|
process.env["ZSTD_CLEVEL"] = level;
|
||||||
|
process.env["GZIP"] = `-${level}`;
|
||||||
|
}
|
||||||
function getInputAsBool(name, options) {
|
function getInputAsBool(name, options) {
|
||||||
const result = core.getInput(name, options);
|
const result = core.getInput(name, options);
|
||||||
return result.toLowerCase() === "true";
|
return result.toLowerCase() === "true";
|
||||||
|
|
@ -59264,6 +59283,24 @@ exports.UserDelegationKeyCredential = UserDelegationKeyCredential;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 83627:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
exports.KnownEncryptionAlgorithmType = void 0;
|
||||||
|
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||||
|
var KnownEncryptionAlgorithmType;
|
||||||
|
(function (KnownEncryptionAlgorithmType) {
|
||||||
|
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||||
|
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||||
|
//# sourceMappingURL=generatedModels.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 30247:
|
/***/ 30247:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -69536,6 +69573,132 @@ exports.listType = {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 56635:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=appendBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 68355:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=blob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 17188:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=blockBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 15337:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=container.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 82354:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
const tslib_1 = __nccwpck_require__(61860);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 14400:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=pageBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 26865:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=service.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 40535:
|
/***/ 40535:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -72741,132 +72904,6 @@ const filterBlobsOperationSpec = {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 56635:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=appendBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 68355:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=blob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 17188:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=blockBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 15337:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=container.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 82354:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
const tslib_1 = __nccwpck_require__(61860);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 14400:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=pageBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 26865:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=service.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5313:
|
/***/ 5313:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -72940,24 +72977,6 @@ exports.StorageClient = StorageClient;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 83627:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.KnownEncryptionAlgorithmType = void 0;
|
|
||||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
|
||||||
var KnownEncryptionAlgorithmType;
|
|
||||||
(function (KnownEncryptionAlgorithmType) {
|
|
||||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
|
||||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
|
||||||
//# sourceMappingURL=generatedModels.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 71400:
|
/***/ 71400:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
|
||||||
307
dist/restore/index.js
vendored
307
dist/restore/index.js
vendored
|
|
@ -44019,6 +44019,7 @@ var Inputs;
|
||||||
Inputs["Path"] = "path";
|
Inputs["Path"] = "path";
|
||||||
Inputs["RestoreKeys"] = "restore-keys";
|
Inputs["RestoreKeys"] = "restore-keys";
|
||||||
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
||||||
|
Inputs["CompressionLevel"] = "compression-level";
|
||||||
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
||||||
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
|
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
|
||||||
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
||||||
|
|
@ -44312,6 +44313,8 @@ exports.logWarning = logWarning;
|
||||||
exports.isValidEvent = isValidEvent;
|
exports.isValidEvent = isValidEvent;
|
||||||
exports.getInputAsArray = getInputAsArray;
|
exports.getInputAsArray = getInputAsArray;
|
||||||
exports.getInputAsInt = getInputAsInt;
|
exports.getInputAsInt = getInputAsInt;
|
||||||
|
exports.getCompressionLevel = getCompressionLevel;
|
||||||
|
exports.setCompressionLevel = setCompressionLevel;
|
||||||
exports.getInputAsBool = getInputAsBool;
|
exports.getInputAsBool = getInputAsBool;
|
||||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
||||||
const cache = __importStar(__nccwpck_require__(5116));
|
const cache = __importStar(__nccwpck_require__(5116));
|
||||||
|
|
@ -44354,6 +44357,22 @@ function getInputAsInt(name, options) {
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
function getCompressionLevel(name, options) {
|
||||||
|
const compressionLevel = getInputAsInt(name, options);
|
||||||
|
if (compressionLevel === undefined) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
if (compressionLevel > 9) {
|
||||||
|
logWarning(`Invalid compression-level provided: ${compressionLevel}. Expected a value between 0 (no compression) and 9 (maximum compression).`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return compressionLevel;
|
||||||
|
}
|
||||||
|
function setCompressionLevel(compressionLevel) {
|
||||||
|
const level = compressionLevel.toString();
|
||||||
|
process.env["ZSTD_CLEVEL"] = level;
|
||||||
|
process.env["GZIP"] = `-${level}`;
|
||||||
|
}
|
||||||
function getInputAsBool(name, options) {
|
function getInputAsBool(name, options) {
|
||||||
const result = core.getInput(name, options);
|
const result = core.getInput(name, options);
|
||||||
return result.toLowerCase() === "true";
|
return result.toLowerCase() === "true";
|
||||||
|
|
@ -59264,6 +59283,24 @@ exports.UserDelegationKeyCredential = UserDelegationKeyCredential;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 83627:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
exports.KnownEncryptionAlgorithmType = void 0;
|
||||||
|
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||||
|
var KnownEncryptionAlgorithmType;
|
||||||
|
(function (KnownEncryptionAlgorithmType) {
|
||||||
|
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||||
|
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||||
|
//# sourceMappingURL=generatedModels.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 30247:
|
/***/ 30247:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -69536,6 +69573,132 @@ exports.listType = {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 56635:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=appendBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 68355:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=blob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 17188:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=blockBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 15337:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=container.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 82354:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
const tslib_1 = __nccwpck_require__(61860);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 14400:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=pageBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 26865:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=service.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 40535:
|
/***/ 40535:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -72741,132 +72904,6 @@ const filterBlobsOperationSpec = {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 56635:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=appendBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 68355:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=blob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 17188:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=blockBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 15337:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=container.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 82354:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
const tslib_1 = __nccwpck_require__(61860);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 14400:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=pageBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 26865:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=service.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5313:
|
/***/ 5313:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -72940,24 +72977,6 @@ exports.StorageClient = StorageClient;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 83627:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.KnownEncryptionAlgorithmType = void 0;
|
|
||||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
|
||||||
var KnownEncryptionAlgorithmType;
|
|
||||||
(function (KnownEncryptionAlgorithmType) {
|
|
||||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
|
||||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
|
||||||
//# sourceMappingURL=generatedModels.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 71400:
|
/***/ 71400:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
|
||||||
311
dist/save-only/index.js
vendored
311
dist/save-only/index.js
vendored
|
|
@ -44019,6 +44019,7 @@ var Inputs;
|
||||||
Inputs["Path"] = "path";
|
Inputs["Path"] = "path";
|
||||||
Inputs["RestoreKeys"] = "restore-keys";
|
Inputs["RestoreKeys"] = "restore-keys";
|
||||||
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
||||||
|
Inputs["CompressionLevel"] = "compression-level";
|
||||||
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
||||||
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
|
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
|
||||||
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
||||||
|
|
@ -44135,6 +44136,10 @@ function saveImpl(stateProvider) {
|
||||||
required: true
|
required: true
|
||||||
});
|
});
|
||||||
const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive);
|
const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive);
|
||||||
|
const compressionLevel = utils.getCompressionLevel(constants_1.Inputs.CompressionLevel);
|
||||||
|
if (compressionLevel !== undefined) {
|
||||||
|
utils.setCompressionLevel(compressionLevel);
|
||||||
|
}
|
||||||
cacheId = yield cache.saveCache(cachePaths, primaryKey, { uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize) }, enableCrossOsArchive);
|
cacheId = yield cache.saveCache(cachePaths, primaryKey, { uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize) }, enableCrossOsArchive);
|
||||||
if (cacheId != -1) {
|
if (cacheId != -1) {
|
||||||
core.info(`Cache saved with key: ${primaryKey}`);
|
core.info(`Cache saved with key: ${primaryKey}`);
|
||||||
|
|
@ -44325,6 +44330,8 @@ exports.logWarning = logWarning;
|
||||||
exports.isValidEvent = isValidEvent;
|
exports.isValidEvent = isValidEvent;
|
||||||
exports.getInputAsArray = getInputAsArray;
|
exports.getInputAsArray = getInputAsArray;
|
||||||
exports.getInputAsInt = getInputAsInt;
|
exports.getInputAsInt = getInputAsInt;
|
||||||
|
exports.getCompressionLevel = getCompressionLevel;
|
||||||
|
exports.setCompressionLevel = setCompressionLevel;
|
||||||
exports.getInputAsBool = getInputAsBool;
|
exports.getInputAsBool = getInputAsBool;
|
||||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
||||||
const cache = __importStar(__nccwpck_require__(5116));
|
const cache = __importStar(__nccwpck_require__(5116));
|
||||||
|
|
@ -44367,6 +44374,22 @@ function getInputAsInt(name, options) {
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
function getCompressionLevel(name, options) {
|
||||||
|
const compressionLevel = getInputAsInt(name, options);
|
||||||
|
if (compressionLevel === undefined) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
if (compressionLevel > 9) {
|
||||||
|
logWarning(`Invalid compression-level provided: ${compressionLevel}. Expected a value between 0 (no compression) and 9 (maximum compression).`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return compressionLevel;
|
||||||
|
}
|
||||||
|
function setCompressionLevel(compressionLevel) {
|
||||||
|
const level = compressionLevel.toString();
|
||||||
|
process.env["ZSTD_CLEVEL"] = level;
|
||||||
|
process.env["GZIP"] = `-${level}`;
|
||||||
|
}
|
||||||
function getInputAsBool(name, options) {
|
function getInputAsBool(name, options) {
|
||||||
const result = core.getInput(name, options);
|
const result = core.getInput(name, options);
|
||||||
return result.toLowerCase() === "true";
|
return result.toLowerCase() === "true";
|
||||||
|
|
@ -59277,6 +59300,24 @@ exports.UserDelegationKeyCredential = UserDelegationKeyCredential;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 83627:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
exports.KnownEncryptionAlgorithmType = void 0;
|
||||||
|
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||||
|
var KnownEncryptionAlgorithmType;
|
||||||
|
(function (KnownEncryptionAlgorithmType) {
|
||||||
|
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||||
|
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||||
|
//# sourceMappingURL=generatedModels.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 30247:
|
/***/ 30247:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -69549,6 +69590,132 @@ exports.listType = {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 56635:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=appendBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 68355:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=blob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 17188:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=blockBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 15337:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=container.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 82354:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
const tslib_1 = __nccwpck_require__(61860);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 14400:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=pageBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 26865:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=service.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 40535:
|
/***/ 40535:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -72754,132 +72921,6 @@ const filterBlobsOperationSpec = {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 56635:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=appendBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 68355:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=blob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 17188:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=blockBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 15337:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=container.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 82354:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
const tslib_1 = __nccwpck_require__(61860);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 14400:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=pageBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 26865:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=service.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5313:
|
/***/ 5313:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -72953,24 +72994,6 @@ exports.StorageClient = StorageClient;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 83627:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.KnownEncryptionAlgorithmType = void 0;
|
|
||||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
|
||||||
var KnownEncryptionAlgorithmType;
|
|
||||||
(function (KnownEncryptionAlgorithmType) {
|
|
||||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
|
||||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
|
||||||
//# sourceMappingURL=generatedModels.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 71400:
|
/***/ 71400:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
|
||||||
311
dist/save/index.js
vendored
311
dist/save/index.js
vendored
|
|
@ -44019,6 +44019,7 @@ var Inputs;
|
||||||
Inputs["Path"] = "path";
|
Inputs["Path"] = "path";
|
||||||
Inputs["RestoreKeys"] = "restore-keys";
|
Inputs["RestoreKeys"] = "restore-keys";
|
||||||
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
||||||
|
Inputs["CompressionLevel"] = "compression-level";
|
||||||
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
||||||
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
|
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
|
||||||
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
||||||
|
|
@ -44135,6 +44136,10 @@ function saveImpl(stateProvider) {
|
||||||
required: true
|
required: true
|
||||||
});
|
});
|
||||||
const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive);
|
const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive);
|
||||||
|
const compressionLevel = utils.getCompressionLevel(constants_1.Inputs.CompressionLevel);
|
||||||
|
if (compressionLevel !== undefined) {
|
||||||
|
utils.setCompressionLevel(compressionLevel);
|
||||||
|
}
|
||||||
cacheId = yield cache.saveCache(cachePaths, primaryKey, { uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize) }, enableCrossOsArchive);
|
cacheId = yield cache.saveCache(cachePaths, primaryKey, { uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize) }, enableCrossOsArchive);
|
||||||
if (cacheId != -1) {
|
if (cacheId != -1) {
|
||||||
core.info(`Cache saved with key: ${primaryKey}`);
|
core.info(`Cache saved with key: ${primaryKey}`);
|
||||||
|
|
@ -44325,6 +44330,8 @@ exports.logWarning = logWarning;
|
||||||
exports.isValidEvent = isValidEvent;
|
exports.isValidEvent = isValidEvent;
|
||||||
exports.getInputAsArray = getInputAsArray;
|
exports.getInputAsArray = getInputAsArray;
|
||||||
exports.getInputAsInt = getInputAsInt;
|
exports.getInputAsInt = getInputAsInt;
|
||||||
|
exports.getCompressionLevel = getCompressionLevel;
|
||||||
|
exports.setCompressionLevel = setCompressionLevel;
|
||||||
exports.getInputAsBool = getInputAsBool;
|
exports.getInputAsBool = getInputAsBool;
|
||||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
||||||
const cache = __importStar(__nccwpck_require__(5116));
|
const cache = __importStar(__nccwpck_require__(5116));
|
||||||
|
|
@ -44367,6 +44374,22 @@ function getInputAsInt(name, options) {
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
function getCompressionLevel(name, options) {
|
||||||
|
const compressionLevel = getInputAsInt(name, options);
|
||||||
|
if (compressionLevel === undefined) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
if (compressionLevel > 9) {
|
||||||
|
logWarning(`Invalid compression-level provided: ${compressionLevel}. Expected a value between 0 (no compression) and 9 (maximum compression).`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return compressionLevel;
|
||||||
|
}
|
||||||
|
function setCompressionLevel(compressionLevel) {
|
||||||
|
const level = compressionLevel.toString();
|
||||||
|
process.env["ZSTD_CLEVEL"] = level;
|
||||||
|
process.env["GZIP"] = `-${level}`;
|
||||||
|
}
|
||||||
function getInputAsBool(name, options) {
|
function getInputAsBool(name, options) {
|
||||||
const result = core.getInput(name, options);
|
const result = core.getInput(name, options);
|
||||||
return result.toLowerCase() === "true";
|
return result.toLowerCase() === "true";
|
||||||
|
|
@ -59277,6 +59300,24 @@ exports.UserDelegationKeyCredential = UserDelegationKeyCredential;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 83627:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
exports.KnownEncryptionAlgorithmType = void 0;
|
||||||
|
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||||
|
var KnownEncryptionAlgorithmType;
|
||||||
|
(function (KnownEncryptionAlgorithmType) {
|
||||||
|
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||||
|
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||||
|
//# sourceMappingURL=generatedModels.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 30247:
|
/***/ 30247:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -69549,6 +69590,132 @@ exports.listType = {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 56635:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=appendBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 68355:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=blob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 17188:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=blockBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 15337:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=container.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 82354:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
const tslib_1 = __nccwpck_require__(61860);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||||
|
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 14400:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=pageBlob.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 26865:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*
|
||||||
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||||
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
//# sourceMappingURL=service.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 40535:
|
/***/ 40535:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -72754,132 +72921,6 @@ const filterBlobsOperationSpec = {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 56635:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=appendBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 68355:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=blob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 17188:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=blockBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 15337:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=container.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 82354:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
const tslib_1 = __nccwpck_require__(61860);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
|
||||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 14400:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=pageBlob.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 26865:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) Microsoft Corporation.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
//# sourceMappingURL=service.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5313:
|
/***/ 5313:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
@ -72953,24 +72994,6 @@ exports.StorageClient = StorageClient;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 83627:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.KnownEncryptionAlgorithmType = void 0;
|
|
||||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
|
||||||
var KnownEncryptionAlgorithmType;
|
|
||||||
(function (KnownEncryptionAlgorithmType) {
|
|
||||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
|
||||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
|
||||||
//# sourceMappingURL=generatedModels.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 71400:
|
/***/ 71400:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ The save action saves a cache. It works similarly to the `cache` action except t
|
||||||
* `key` - An explicit key for a cache entry. See [creating a cache key](../README.md#creating-a-cache-key).
|
* `key` - An explicit key for a cache entry. See [creating a cache key](../README.md#creating-a-cache-key).
|
||||||
* `path` - A list of files, directories, and wildcard patterns to cache. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns.
|
* `path` - A list of files, directories, and wildcard patterns to cache. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns.
|
||||||
* `upload-chunk-size` - The chunk size used to split up large files during upload, in bytes
|
* `upload-chunk-size` - The chunk size used to split up large files during upload, in bytes
|
||||||
|
* `compression-level` - Compression level to use when creating cache archives. Use `0` for no compression and `9` for maximum compression. Defaults to the compression tool's standard level when unset.
|
||||||
|
|
||||||
### Outputs
|
### Outputs
|
||||||
|
|
||||||
|
|
@ -16,7 +17,6 @@ This action has no outputs.
|
||||||
|
|
||||||
## Use cases
|
## Use cases
|
||||||
|
|
||||||
|
|
||||||
### Only save cache
|
### Only save cache
|
||||||
|
|
||||||
If you are using separate jobs for generating common artifacts and sharing them across jobs, this action will take care of your cache saving needs.
|
If you are using separate jobs for generating common artifacts and sharing them across jobs, this action will take care of your cache saving needs.
|
||||||
|
|
@ -54,6 +54,7 @@ with:
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Case 1 - Where a user would want to reuse the key as it is
|
#### Case 1 - Where a user would want to reuse the key as it is
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ inputs:
|
||||||
upload-chunk-size:
|
upload-chunk-size:
|
||||||
description: 'The chunk size used to split up large files during upload, in bytes'
|
description: 'The chunk size used to split up large files during upload, in bytes'
|
||||||
required: false
|
required: false
|
||||||
|
compression-level:
|
||||||
|
description: 'Compression level used when creating cache archives. Set 0 for no compression and 9 for maximum compression. Defaults to the compression tool defaults when unset'
|
||||||
|
required: false
|
||||||
enableCrossOsArchive:
|
enableCrossOsArchive:
|
||||||
description: 'An optional boolean when enabled, allows windows runners to save caches that can be restored on other platforms'
|
description: 'An optional boolean when enabled, allows windows runners to save caches that can be restored on other platforms'
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ export enum Inputs {
|
||||||
Path = "path", // Input for cache, restore, save action
|
Path = "path", // Input for cache, restore, save action
|
||||||
RestoreKeys = "restore-keys", // Input for cache, restore action
|
RestoreKeys = "restore-keys", // Input for cache, restore action
|
||||||
UploadChunkSize = "upload-chunk-size", // Input for cache, save action
|
UploadChunkSize = "upload-chunk-size", // Input for cache, save action
|
||||||
|
CompressionLevel = "compression-level", // Input for cache, save action
|
||||||
EnableCrossOsArchive = "enableCrossOsArchive", // Input for cache, restore, save action
|
EnableCrossOsArchive = "enableCrossOsArchive", // Input for cache, restore, save action
|
||||||
FailOnCacheMiss = "fail-on-cache-miss", // Input for cache, restore action
|
FailOnCacheMiss = "fail-on-cache-miss", // Input for cache, restore action
|
||||||
LookupOnly = "lookup-only" // Input for cache, restore action
|
LookupOnly = "lookup-only" // Input for cache, restore action
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,7 @@ export async function saveImpl(
|
||||||
|
|
||||||
if (!utils.isValidEvent()) {
|
if (!utils.isValidEvent()) {
|
||||||
utils.logWarning(
|
utils.logWarning(
|
||||||
`Event Validation Error: The event type ${
|
`Event Validation Error: The event type ${process.env[Events.Key]
|
||||||
process.env[Events.Key]
|
|
||||||
} is not supported because it's not tied to a branch or tag ref.`
|
} is not supported because it's not tied to a branch or tag ref.`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
|
@ -62,6 +61,14 @@ export async function saveImpl(
|
||||||
Inputs.EnableCrossOsArchive
|
Inputs.EnableCrossOsArchive
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const compressionLevel = utils.getCompressionLevel(
|
||||||
|
Inputs.CompressionLevel
|
||||||
|
);
|
||||||
|
|
||||||
|
if (compressionLevel !== undefined) {
|
||||||
|
utils.setCompressionLevel(compressionLevel);
|
||||||
|
}
|
||||||
|
|
||||||
cacheId = await cache.saveCache(
|
cacheId = await cache.saveCache(
|
||||||
cachePaths,
|
cachePaths,
|
||||||
primaryKey,
|
primaryKey,
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,32 @@ export function getInputAsInt(
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getCompressionLevel(
|
||||||
|
name: string,
|
||||||
|
options?: core.InputOptions
|
||||||
|
): number | undefined {
|
||||||
|
const compressionLevel = getInputAsInt(name, options);
|
||||||
|
|
||||||
|
if (compressionLevel === undefined) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (compressionLevel > 9) {
|
||||||
|
logWarning(
|
||||||
|
`Invalid compression-level provided: ${compressionLevel}. Expected a value between 0 (no compression) and 9 (maximum compression).`
|
||||||
|
);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return compressionLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setCompressionLevel(compressionLevel: number): void {
|
||||||
|
const level = compressionLevel.toString();
|
||||||
|
process.env["ZSTD_CLEVEL"] = level;
|
||||||
|
process.env["GZIP"] = `-${level}`;
|
||||||
|
}
|
||||||
|
|
||||||
export function getInputAsBool(
|
export function getInputAsBool(
|
||||||
name: string,
|
name: string,
|
||||||
options?: core.InputOptions
|
options?: core.InputOptions
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user