removed region

This commit is contained in:
Caleb Gosiak 2021-10-04 11:02:09 -05:00
parent 2e9ce0166f
commit efa512101d
8 changed files with 9 additions and 31 deletions

View file

@ -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;
}

View file

@ -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"

View file

@ -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)
);

View file

@ -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);