mirror of
				https://github.com/docker/login-action.git
				synced 2025-10-31 18:20:10 +08:00 
			
		
		
		
	add args for retries
Signed-off-by: Fedor Dikarev <fedor.dikarev@gmail.com>
This commit is contained in:
		
							parent
							
								
									327cd5a69d
								
							
						
					
					
						commit
						2bc89718bc
					
				| @ -507,6 +507,9 @@ The following inputs can be used as `step.with` keys: | |||||||
| | `password` | String |         | Password or personal access token for authenticating the Docker registry      | | | `password` | String |         | Password or personal access token for authenticating the Docker registry      | | ||||||
| | `ecr`      | String | `auto`  | Specifies whether the given registry is ECR (`auto`, `true` or `false`)       | | | `ecr`      | String | `auto`  | Specifies whether the given registry is ECR (`auto`, `true` or `false`)       | | ||||||
| | `logout`   | Bool   | `true`  | Log out from the Docker registry at the end of a job                          | | | `logout`   | Bool   | `true`  | Log out from the Docker registry at the end of a job                          | | ||||||
|  | | `http_errors_to_retry` | String | `408,500,502,504` | Comma separated list of HTTP error codes we want to retry | | ||||||
|  | | `max_attempts` | String | `1` | Overall maximum number of attempts we will make trying to login (1 means no retries) | | ||||||
|  | | `retry_timeout` | String | `15` | Timeout between retries, in seconds | | ||||||
| 
 | 
 | ||||||
| ## Contributing | ## Contributing | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										11
									
								
								action.yml
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								action.yml
									
									
									
									
									
								
							| @ -24,6 +24,17 @@ inputs: | |||||||
|     description: 'Log out from the Docker registry at the end of a job' |     description: 'Log out from the Docker registry at the end of a job' | ||||||
|     default: 'true' |     default: 'true' | ||||||
|     required: false |     required: false | ||||||
|  |   http_errors_to_retry: | ||||||
|  |     description: 'Comma separated list of HTTP error codes we want to retry' | ||||||
|  |     default: '408,500,502,504' | ||||||
|  |   max_attempts: | ||||||
|  |     description: 'Overall maximum number of attempts we will make trying to login' | ||||||
|  |     default: '1' | ||||||
|  |     required: false | ||||||
|  |   retry_timeout: | ||||||
|  |     description: 'Timeout between retries, in seconds' | ||||||
|  |     default: '15' | ||||||
|  |     required: false | ||||||
| 
 | 
 | ||||||
| runs: | runs: | ||||||
|   using: 'node20' |   using: 'node20' | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -6,6 +6,9 @@ export interface Inputs { | |||||||
|   password: string; |   password: string; | ||||||
|   ecr: string; |   ecr: string; | ||||||
|   logout: boolean; |   logout: boolean; | ||||||
|  |   http_errors_to_retry: string[]; | ||||||
|  |   max_attempts: number; | ||||||
|  |   retry_timeout: number; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export function getInputs(): Inputs { | export function getInputs(): Inputs { | ||||||
| @ -14,6 +17,9 @@ export function getInputs(): Inputs { | |||||||
|     username: core.getInput('username'), |     username: core.getInput('username'), | ||||||
|     password: core.getInput('password'), |     password: core.getInput('password'), | ||||||
|     ecr: core.getInput('ecr'), |     ecr: core.getInput('ecr'), | ||||||
|     logout: core.getBooleanInput('logout') |     logout: core.getBooleanInput('logout'), | ||||||
|  |     http_errors_to_retry: core.getInput('http_errors_to_retry').split(','), | ||||||
|  |     max_attempts: Number.parseInt(core.getInput('max_attempts')), | ||||||
|  |     retry_timeout: Number.parseInt(core.getInput('retry_timeout')) | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Fedor Dikarev
						Fedor Dikarev