mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-22 00:33:57 +08:00
v0.12.0
This commit is contained in:
parent
7b3fb19462
commit
2e9ce0166f
5 changed files with 44 additions and 24 deletions
|
@ -16,10 +16,10 @@ inputs:
|
|||
required: true
|
||||
access-key-id:
|
||||
description: 'aws access key id'
|
||||
required: true
|
||||
required: false
|
||||
secret-access-key:
|
||||
description: 'aws secret access key'
|
||||
required: true
|
||||
required: false
|
||||
bucket:
|
||||
description: 'aws s3 bucket'
|
||||
required: true
|
||||
|
|
21
dist/restore/index.js
vendored
21
dist/restore/index.js
vendored
|
@ -43288,13 +43288,20 @@ const path = __importStar(__webpack_require__(5622));
|
|||
const actionUtils_1 = __webpack_require__(443);
|
||||
class CacheService {
|
||||
constructor(accessKeyId, secretAccessKey, region, bucket) {
|
||||
this._client = new aws_sdk_1.S3({
|
||||
region: region,
|
||||
credentials: {
|
||||
accessKeyId: accessKeyId,
|
||||
secretAccessKey: secretAccessKey
|
||||
}
|
||||
});
|
||||
if (accessKeyId && secretAccessKey) {
|
||||
this._client = new aws_sdk_1.S3({
|
||||
region: region,
|
||||
credentials: {
|
||||
accessKeyId: accessKeyId,
|
||||
secretAccessKey: secretAccessKey
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this._client = new aws_sdk_1.S3({
|
||||
region: region
|
||||
});
|
||||
}
|
||||
this._bucket = bucket;
|
||||
}
|
||||
restoreCache(paths, primaryKey, restoreKeys) {
|
||||
|
|
21
dist/save/index.js
vendored
21
dist/save/index.js
vendored
|
@ -43288,13 +43288,20 @@ const path = __importStar(__webpack_require__(5622));
|
|||
const actionUtils_1 = __webpack_require__(443);
|
||||
class CacheService {
|
||||
constructor(accessKeyId, secretAccessKey, region, bucket) {
|
||||
this._client = new aws_sdk_1.S3({
|
||||
region: region,
|
||||
credentials: {
|
||||
accessKeyId: accessKeyId,
|
||||
secretAccessKey: secretAccessKey
|
||||
}
|
||||
});
|
||||
if (accessKeyId && secretAccessKey) {
|
||||
this._client = new aws_sdk_1.S3({
|
||||
region: region,
|
||||
credentials: {
|
||||
accessKeyId: accessKeyId,
|
||||
secretAccessKey: secretAccessKey
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this._client = new aws_sdk_1.S3({
|
||||
region: region
|
||||
});
|
||||
}
|
||||
this._bucket = bucket;
|
||||
}
|
||||
restoreCache(paths, primaryKey, restoreKeys) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cache",
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"private": true,
|
||||
"description": "Cache dependencies and build outputs",
|
||||
"main": "dist/restore/index.js",
|
||||
|
|
|
@ -24,13 +24,19 @@ export class CacheService {
|
|||
region: string,
|
||||
bucket: string
|
||||
) {
|
||||
this._client = new S3({
|
||||
region: region,
|
||||
credentials: {
|
||||
accessKeyId: accessKeyId,
|
||||
secretAccessKey: secretAccessKey
|
||||
}
|
||||
});
|
||||
if (accessKeyId && secretAccessKey) {
|
||||
this._client = new S3({
|
||||
region: region,
|
||||
credentials: {
|
||||
accessKeyId: accessKeyId,
|
||||
secretAccessKey: secretAccessKey
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this._client = new S3({
|
||||
region: region
|
||||
});
|
||||
}
|
||||
this._bucket = bucket;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue