mirror of
https://github.com/actions/cache.git
synced 2025-07-19 13:25:18 -06:00
removed region
This commit is contained in:
parent
2e9ce0166f
commit
efa512101d
8 changed files with 9 additions and 31 deletions
|
@ -18,24 +18,16 @@ export class CacheService {
|
|||
private _client: S3;
|
||||
private _bucket: string;
|
||||
|
||||
constructor(
|
||||
accessKeyId: string,
|
||||
secretAccessKey: string,
|
||||
region: string,
|
||||
bucket: string
|
||||
) {
|
||||
constructor(accessKeyId: string, secretAccessKey: string, bucket: string) {
|
||||
if (accessKeyId && secretAccessKey) {
|
||||
this._client = new S3({
|
||||
region: region,
|
||||
credentials: {
|
||||
accessKeyId: accessKeyId,
|
||||
secretAccessKey: secretAccessKey
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this._client = new S3({
|
||||
region: region
|
||||
});
|
||||
this._client = new S3();
|
||||
}
|
||||
this._bucket = bucket;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ export enum Inputs {
|
|||
Key = "key",
|
||||
Path = "path",
|
||||
RestoreKeys = "restore-keys",
|
||||
Region = "region",
|
||||
AccessKeyId = "access-key-id",
|
||||
SecretAccessKey = "secret-access-key",
|
||||
Bucket = "bucket"
|
||||
|
|
|
@ -18,7 +18,6 @@ async function run(): Promise<void> {
|
|||
const cache: CacheService = new CacheService(
|
||||
core.getInput(Inputs.AccessKeyId),
|
||||
core.getInput(Inputs.SecretAccessKey),
|
||||
core.getInput(Inputs.Region),
|
||||
core.getInput(Inputs.Bucket)
|
||||
);
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ async function run(): Promise<void> {
|
|||
const cache: CacheService = new CacheService(
|
||||
core.getInput(Inputs.AccessKeyId),
|
||||
core.getInput(Inputs.SecretAccessKey),
|
||||
core.getInput(Inputs.Region),
|
||||
core.getInput(Inputs.Bucket)
|
||||
);
|
||||
await cache.saveCache(cachePaths, primaryKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue