|
|
|
@ -5430,7 +5430,6 @@ var Inputs;
|
|
|
|
|
Inputs["Key"] = "key";
|
|
|
|
|
Inputs["Path"] = "path";
|
|
|
|
|
Inputs["RestoreKeys"] = "restore-keys";
|
|
|
|
|
Inputs["Region"] = "region";
|
|
|
|
|
Inputs["AccessKeyId"] = "access-key-id";
|
|
|
|
|
Inputs["SecretAccessKey"] = "secret-access-key";
|
|
|
|
|
Inputs["Bucket"] = "bucket";
|
|
|
|
@ -37463,7 +37462,7 @@ function run() {
|
|
|
|
|
required: true
|
|
|
|
|
});
|
|
|
|
|
try {
|
|
|
|
|
const cache = new cache_service_1.CacheService(core.getInput(constants_1.Inputs.AccessKeyId), core.getInput(constants_1.Inputs.SecretAccessKey), core.getInput(constants_1.Inputs.Region), core.getInput(constants_1.Inputs.Bucket));
|
|
|
|
|
const cache = new cache_service_1.CacheService(core.getInput(constants_1.Inputs.AccessKeyId), core.getInput(constants_1.Inputs.SecretAccessKey), core.getInput(constants_1.Inputs.Bucket));
|
|
|
|
|
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys);
|
|
|
|
|
if (!cacheKey) {
|
|
|
|
|
core.info(`Cache not found for input keys: ${[
|
|
|
|
@ -43287,10 +43286,9 @@ const fs_1 = __importDefault(__webpack_require__(5747));
|
|
|
|
|
const path = __importStar(__webpack_require__(5622));
|
|
|
|
|
const actionUtils_1 = __webpack_require__(443);
|
|
|
|
|
class CacheService {
|
|
|
|
|
constructor(accessKeyId, secretAccessKey, region, bucket) {
|
|
|
|
|
constructor(accessKeyId, secretAccessKey, bucket) {
|
|
|
|
|
if (accessKeyId && secretAccessKey) {
|
|
|
|
|
this._client = new aws_sdk_1.S3({
|
|
|
|
|
region: region,
|
|
|
|
|
credentials: {
|
|
|
|
|
accessKeyId: accessKeyId,
|
|
|
|
|
secretAccessKey: secretAccessKey
|
|
|
|
@ -43298,9 +43296,7 @@ class CacheService {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this._client = new aws_sdk_1.S3({
|
|
|
|
|
region: region
|
|
|
|
|
});
|
|
|
|
|
this._client = new aws_sdk_1.S3();
|
|
|
|
|
}
|
|
|
|
|
this._bucket = bucket;
|
|
|
|
|
}
|
|
|
|
|