mirror of
				https://github.com/docker/login-action.git
				synced 2025-10-31 01:40:11 +08:00 
			
		
		
		
	Retrieve command
This commit is contained in:
		
							parent
							
								
									da3da99964
								
							
						
					
					
						commit
						26618cd0df
					
				
							
								
								
									
										10
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -1095,12 +1095,18 @@ function run() { | |||||||
|                 const ecrRegion = yield ecr.getRegion(registry); |                 const ecrRegion = yield ecr.getRegion(registry); | ||||||
|                 process.env.AWS_ACCESS_KEY_ID = username; |                 process.env.AWS_ACCESS_KEY_ID = username; | ||||||
|                 process.env.AWS_SECRET_ACCESS_KEY = password; |                 process.env.AWS_SECRET_ACCESS_KEY = password; | ||||||
|                 core.info(`🔑 Logging into AWS ECR region ${ecrRegion}...`); |                 core.info(`⬇️ Retrieving docker login command for ECR region ${ecrRegion}...`); | ||||||
|                 yield execm.exec('aws', ['ecr', 'get-login', '--region', ecrRegion, '--no-include-email'], true).then(res => { |                 yield execm.exec('aws', ['ecr', 'get-login', '--region', ecrRegion, '--no-include-email'], true).then(res => { | ||||||
|                     if (res.stderr != '' && !res.success) { |                     if (res.stderr != '' && !res.success) { | ||||||
|                         throw new Error(res.stderr); |                         throw new Error(res.stderr); | ||||||
|                     } |                     } | ||||||
|                     core.info('🎉 Login Succeeded!'); |                     core.info(`🔑 Logging into ${registry}...`); | ||||||
|  |                     execm.exec(res.stdout, [], true).then(res => { | ||||||
|  |                         if (res.stderr != '' && !res.success) { | ||||||
|  |                             throw new Error(res.stderr); | ||||||
|  |                         } | ||||||
|  |                         core.info('🎉 Login Succeeded!'); | ||||||
|  |                     }); | ||||||
|                 }); |                 }); | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								src/main.ts
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/main.ts
									
									
									
									
									
								
							| @ -26,12 +26,18 @@ async function run(): Promise<void> { | |||||||
|       process.env.AWS_ACCESS_KEY_ID = username; |       process.env.AWS_ACCESS_KEY_ID = username; | ||||||
|       process.env.AWS_SECRET_ACCESS_KEY = password; |       process.env.AWS_SECRET_ACCESS_KEY = password; | ||||||
| 
 | 
 | ||||||
|       core.info(`🔑 Logging into AWS ECR region ${ecrRegion}...`); |       core.info(`⬇️ Retrieving docker login command for ECR region ${ecrRegion}...`); | ||||||
|       await execm.exec('aws', ['ecr', 'get-login', '--region', ecrRegion, '--no-include-email'], true).then(res => { |       await execm.exec('aws', ['ecr', 'get-login', '--region', ecrRegion, '--no-include-email'], true).then(res => { | ||||||
|         if (res.stderr != '' && !res.success) { |         if (res.stderr != '' && !res.success) { | ||||||
|           throw new Error(res.stderr); |           throw new Error(res.stderr); | ||||||
|         } |         } | ||||||
|         core.info('🎉 Login Succeeded!'); |         core.info(`🔑 Logging into ${registry}...`); | ||||||
|  |         execm.exec(res.stdout, [], true).then(res => { | ||||||
|  |           if (res.stderr != '' && !res.success) { | ||||||
|  |             throw new Error(res.stderr); | ||||||
|  |           } | ||||||
|  |           core.info('🎉 Login Succeeded!'); | ||||||
|  |         }); | ||||||
|       }); |       }); | ||||||
|     } else { |     } else { | ||||||
|       let loginArgs: Array<string> = ['login', '--password', password]; |       let loginArgs: Array<string> = ['login', '--password', password]; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 CrazyMax
						CrazyMax