diff --git a/action.yml b/action.yml index 4458b2e..f546212 100644 --- a/action.yml +++ b/action.yml @@ -31,10 +31,10 @@ inputs: required: true aws-access-key-id: description: 'An AWS access key id to access the bucket' - required: true + required: false aws-secret-access-key: description: 'An AWS secret access key to access the bucket' - required: true + required: false aws-region: description: 'An AWS region where the bucket is located' required: false diff --git a/dist/restore-only/index.js b/dist/restore-only/index.js index c158226..5a450e3 100644 --- a/dist/restore-only/index.js +++ b/dist/restore-only/index.js @@ -15852,10 +15852,12 @@ function getInputS3ClientConfig() { } const s3config = { credentials: { - accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId), - secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) + accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId) || + process.env["AWS_ACCESS_KEY_ID"], + secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) || + process.env["AWS_SECRET_ACCESS_KEY"] }, - region: core.getInput(constants_1.Inputs.AWSRegion), + region: core.getInput(constants_1.Inputs.AWSRegion) || process.env["AWS_REGION"], endpoint: core.getInput(constants_1.Inputs.AWSEndpoint), bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) diff --git a/dist/restore/index.js b/dist/restore/index.js index dc64d7d..f558688 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -15852,10 +15852,12 @@ function getInputS3ClientConfig() { } const s3config = { credentials: { - accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId), - secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) + accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId) || + process.env["AWS_ACCESS_KEY_ID"], + secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) || + process.env["AWS_SECRET_ACCESS_KEY"] }, - region: core.getInput(constants_1.Inputs.AWSRegion), + region: core.getInput(constants_1.Inputs.AWSRegion) || process.env["AWS_REGION"], endpoint: core.getInput(constants_1.Inputs.AWSEndpoint), bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) diff --git a/dist/save-only/index.js b/dist/save-only/index.js index d5f65d0..fc88726 100644 --- a/dist/save-only/index.js +++ b/dist/save-only/index.js @@ -15852,10 +15852,12 @@ function getInputS3ClientConfig() { } const s3config = { credentials: { - accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId), - secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) + accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId) || + process.env["AWS_ACCESS_KEY_ID"], + secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) || + process.env["AWS_SECRET_ACCESS_KEY"] }, - region: core.getInput(constants_1.Inputs.AWSRegion), + region: core.getInput(constants_1.Inputs.AWSRegion) || process.env["AWS_REGION"], endpoint: core.getInput(constants_1.Inputs.AWSEndpoint), bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) diff --git a/dist/save/index.js b/dist/save/index.js index aec0a86..3b174c4 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -15852,10 +15852,12 @@ function getInputS3ClientConfig() { } const s3config = { credentials: { - accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId), - secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) + accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId) || + process.env["AWS_ACCESS_KEY_ID"], + secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) || + process.env["AWS_SECRET_ACCESS_KEY"] }, - region: core.getInput(constants_1.Inputs.AWSRegion), + region: core.getInput(constants_1.Inputs.AWSRegion) || process.env["AWS_REGION"], endpoint: core.getInput(constants_1.Inputs.AWSEndpoint), bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) diff --git a/src/utils/actionUtils.ts b/src/utils/actionUtils.ts index fff7de2..24ae3a0 100644 --- a/src/utils/actionUtils.ts +++ b/src/utils/actionUtils.ts @@ -88,10 +88,14 @@ export function getInputS3ClientConfig(): S3ClientConfig | undefined { const s3config = { credentials: { - accessKeyId: core.getInput(Inputs.AWSAccessKeyId), - secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey) + accessKeyId: + core.getInput(Inputs.AWSAccessKeyId) || + process.env["AWS_ACCESS_KEY_ID"], + secretAccessKey: + core.getInput(Inputs.AWSSecretAccessKey) || + process.env["AWS_SECRET_ACCESS_KEY"] }, - region: core.getInput(Inputs.AWSRegion), + region: core.getInput(Inputs.AWSRegion) || process.env["AWS_REGION"], endpoint: core.getInput(Inputs.AWSEndpoint), bucketEndpoint: core.getBooleanInput(Inputs.AWSS3BucketEndpoint), forcePathStyle: core.getBooleanInput(Inputs.AWSS3ForcePathStyle)