From e6e13d9c5279e6229bf926ec658aa06f2fd6e652 Mon Sep 17 00:00:00 2001 From: Dan Blanchard Date: Thu, 31 Aug 2023 14:14:17 -0400 Subject: [PATCH] Clean up actionUtils.ts a little --- src/utils/actionUtils.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/utils/actionUtils.ts b/src/utils/actionUtils.ts index 16880f7..fff7de2 100644 --- a/src/utils/actionUtils.ts +++ b/src/utils/actionUtils.ts @@ -1,9 +1,8 @@ import * as cache from "@actions/cache"; import * as core from "@actions/core"; +import { S3ClientConfig } from "@aws-sdk/client-s3"; -import { Inputs, Outputs, RefKey, State } from "../constants"; - -import {CommonPrefix, InputSerialization, S3ClientConfig} from "@aws-sdk/client-s3"; +import { Inputs, RefKey } from "../constants"; export function isGhes(): boolean { const ghUrl = new URL( @@ -82,23 +81,23 @@ Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github } export function getInputS3ClientConfig(): S3ClientConfig | undefined { - const s3BucketName = core.getInput(Inputs.AWSS3Bucket) + const s3BucketName = core.getInput(Inputs.AWSS3Bucket); if (!s3BucketName) { - return undefined + return undefined; } const s3config = { credentials: { - accessKeyId: core.getInput(Inputs.AWSAccessKeyId), - secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey) + accessKeyId: core.getInput(Inputs.AWSAccessKeyId), + secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey) }, region: core.getInput(Inputs.AWSRegion), endpoint: core.getInput(Inputs.AWSEndpoint), bucketEndpoint: core.getBooleanInput(Inputs.AWSS3BucketEndpoint), - forcePathStyle: core.getBooleanInput(Inputs.AWSS3ForcePathStyle), - } as S3ClientConfig + forcePathStyle: core.getBooleanInput(Inputs.AWSS3ForcePathStyle) + } as S3ClientConfig; - core.debug('Enable S3 backend mode.') + core.debug("Enable S3 backend mode."); - return s3config + return s3config; }