mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 03:38:36 +08:00 
			
		
		
		
	allow env vars
This commit is contained in:
		
							parent
							
								
									a0cd727d86
								
							
						
					
					
						commit
						d150281810
					
				|  | @ -19,10 +19,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 | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ import * as core from "@actions/core"; | ||||||
| 
 | 
 | ||||||
| import { Inputs, Outputs, RefKey, State } from "../constants"; | import { Inputs, Outputs, RefKey, State } from "../constants"; | ||||||
| 
 | 
 | ||||||
| import {CommonPrefix, InputSerialization, S3ClientConfig} from "@aws-sdk/client-s3"; | import {S3ClientConfig} from "@aws-sdk/client-s3"; | ||||||
| 
 | 
 | ||||||
| export function isGhes(): boolean { | export function isGhes(): boolean { | ||||||
|     const ghUrl = new URL( |     const ghUrl = new URL( | ||||||
|  | @ -85,10 +85,10 @@ export function getInputS3ClientConfig(): S3ClientConfig | undefined { | ||||||
| 
 | 
 | ||||||
|     const s3config = { |     const s3config = { | ||||||
|         credentials: { |         credentials: { | ||||||
|           accessKeyId: core.getInput(Inputs.AWSAccessKeyId), |           accessKeyId: core.getInput(Inputs.AWSAccessKeyId) || process.env['AWS_ACCESS_KEY_ID'], | ||||||
|           secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey) |           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
						Rami