3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-23 03:45:31 +00:00

Allow env vars (#13)

* allow env vars

* manually run prettier

* rebuild dist

* Revert "rebuild dist"

This reverts commit 9d562404127f788fe91e072dde1d09ddaf287d30.

* rebuild dist using node16
This commit is contained in:
Rami Lukata 2023-10-31 17:34:48 +01:00 committed by GitHub
parent d792d9b725
commit 7d69ef2398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 17 deletions

View file

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