mirror of
				https://github.com/actions/cache.git
				synced 2025-11-01 04:28:39 +08: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:
		
							parent
							
								
									d792d9b725
								
							
						
					
					
						commit
						7d69ef2398
					
				|  | @ -31,10 +31,10 @@ inputs: | ||||||
|     required: true |     required: true | ||||||
|   aws-access-key-id: |   aws-access-key-id: | ||||||
|     description: 'An AWS access key id to access the bucket' |     description: 'An AWS access key id to access the bucket' | ||||||
|     required: true |     required: false | ||||||
|   aws-secret-access-key: |   aws-secret-access-key: | ||||||
|     description: 'An AWS secret access key to access the bucket' |     description: 'An AWS secret access key to access the bucket' | ||||||
|     required: true |     required: false | ||||||
|   aws-region: |   aws-region: | ||||||
|     description: 'An AWS region where the bucket is located' |     description: 'An AWS region where the bucket is located' | ||||||
|     required: false |     required: false | ||||||
|  |  | ||||||
							
								
								
									
										8
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -15852,10 +15852,12 @@ function getInputS3ClientConfig() { | ||||||
|     } |     } | ||||||
|     const s3config = { |     const s3config = { | ||||||
|         credentials: { |         credentials: { | ||||||
|             accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId), |             accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId) || | ||||||
|             secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) |                 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), |         endpoint: core.getInput(constants_1.Inputs.AWSEndpoint), | ||||||
|         bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), |         bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), | ||||||
|         forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) |         forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) | ||||||
|  |  | ||||||
							
								
								
									
										8
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -15852,10 +15852,12 @@ function getInputS3ClientConfig() { | ||||||
|     } |     } | ||||||
|     const s3config = { |     const s3config = { | ||||||
|         credentials: { |         credentials: { | ||||||
|             accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId), |             accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId) || | ||||||
|             secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) |                 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), |         endpoint: core.getInput(constants_1.Inputs.AWSEndpoint), | ||||||
|         bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), |         bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), | ||||||
|         forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) |         forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) | ||||||
|  |  | ||||||
							
								
								
									
										8
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -15852,10 +15852,12 @@ function getInputS3ClientConfig() { | ||||||
|     } |     } | ||||||
|     const s3config = { |     const s3config = { | ||||||
|         credentials: { |         credentials: { | ||||||
|             accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId), |             accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId) || | ||||||
|             secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) |                 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), |         endpoint: core.getInput(constants_1.Inputs.AWSEndpoint), | ||||||
|         bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), |         bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), | ||||||
|         forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) |         forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) | ||||||
|  |  | ||||||
							
								
								
									
										8
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -15852,10 +15852,12 @@ function getInputS3ClientConfig() { | ||||||
|     } |     } | ||||||
|     const s3config = { |     const s3config = { | ||||||
|         credentials: { |         credentials: { | ||||||
|             accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId), |             accessKeyId: core.getInput(constants_1.Inputs.AWSAccessKeyId) || | ||||||
|             secretAccessKey: core.getInput(constants_1.Inputs.AWSSecretAccessKey) |                 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), |         endpoint: core.getInput(constants_1.Inputs.AWSEndpoint), | ||||||
|         bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), |         bucketEndpoint: core.getBooleanInput(constants_1.Inputs.AWSS3BucketEndpoint), | ||||||
|         forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) |         forcePathStyle: core.getBooleanInput(constants_1.Inputs.AWSS3ForcePathStyle) | ||||||
|  |  | ||||||
|  | @ -88,10 +88,14 @@ export function getInputS3ClientConfig(): S3ClientConfig | undefined { | ||||||
| 
 | 
 | ||||||
|     const s3config = { |     const s3config = { | ||||||
|         credentials: { |         credentials: { | ||||||
|             accessKeyId: core.getInput(Inputs.AWSAccessKeyId), |             accessKeyId: | ||||||
|             secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey) |                 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), |         endpoint: core.getInput(Inputs.AWSEndpoint), | ||||||
|         bucketEndpoint: core.getBooleanInput(Inputs.AWSS3BucketEndpoint), |         bucketEndpoint: core.getBooleanInput(Inputs.AWSS3BucketEndpoint), | ||||||
|         forcePathStyle: core.getBooleanInput(Inputs.AWSS3ForcePathStyle) |         forcePathStyle: core.getBooleanInput(Inputs.AWSS3ForcePathStyle) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rami Lukata
						Rami Lukata