mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-23 01:03:57 +08:00
removed region
This commit is contained in:
parent
2e9ce0166f
commit
efa512101d
8 changed files with 9 additions and 31 deletions
10
dist/save/index.js
vendored
10
dist/save/index.js
vendored
|
@ -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";
|
||||
|
@ -25883,7 +25882,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));
|
||||
yield cache.saveCache(cachePaths, primaryKey);
|
||||
core.info(`Cache saved with key: ${primaryKey}`);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue