@@ -454,24 +454,11 @@ async function createCodeDeployDeployment(codedeploy, clusterName, service, task
454
454
455
455
async function run ( ) {
456
456
try {
457
- const maxRetries = parseInt ( core . getInput ( 'max-retries' , { required : false } ) ) || 3 ;
458
-
459
- const ecs = new ECS ( {
460
- customUserAgent : 'amazon-ecs-deploy-task-definition-for-github-actions' ,
461
- maxAttempts : maxRetries ,
462
- retryMode : 'standard'
463
- } ) ;
464
-
465
- const codedeploy = new CodeDeploy ( {
466
- customUserAgent : 'amazon-ecs-deploy-task-definition-for-github-actions' ,
467
- maxAttempts : maxRetries ,
468
- retryMode : 'standard'
469
- } ) ;
470
-
471
457
// Get inputs
472
458
const taskDefinitionFile = core . getInput ( 'task-definition' , { required : true } ) ;
473
459
const service = core . getInput ( 'service' , { required : false } ) ;
474
460
const cluster = core . getInput ( 'cluster' , { required : false } ) ;
461
+ const maxRetries = parseInt ( core . getInput ( 'max-retries' , { required : false } ) ) || 3 ;
475
462
const waitForService = core . getInput ( 'wait-for-service-stability' , { required : false } ) ;
476
463
let waitForMinutes = parseInt ( core . getInput ( 'wait-for-minutes' , { required : false } ) ) || 30 ;
477
464
@@ -493,6 +480,18 @@ async function run() {
493
480
propagateTags = propagateTagsInput ;
494
481
}
495
482
483
+ const ecs = new ECS ( {
484
+ customUserAgent : 'amazon-ecs-deploy-task-definition-for-github-actions' ,
485
+ maxAttempts : maxRetries ,
486
+ retryMode : 'standard'
487
+ } ) ;
488
+
489
+ const codedeploy = new CodeDeploy ( {
490
+ customUserAgent : 'amazon-ecs-deploy-task-definition-for-github-actions' ,
491
+ maxAttempts : maxRetries ,
492
+ retryMode : 'standard'
493
+ } ) ;
494
+
496
495
// Register the task definition
497
496
core . debug ( 'Registering the task definition' ) ;
498
497
const taskDefPath = path . isAbsolute ( taskDefinitionFile ) ?
0 commit comments