Skip to content

Commit 9e47aba

Browse files
committed
Add maxAttempts in API calls
1 parent 196ff9d commit 9e47aba

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,18 @@ async function createCodeDeployDeployment(codedeploy, clusterName, service, task
454454

455455
async function run() {
456456
try {
457+
const maxRetries = parseInt(core.getInput('max-retries', { required: false })) || 3;
458+
457459
const ecs = new ECS({
458-
customUserAgent: 'amazon-ecs-deploy-task-definition-for-github-actions'
460+
customUserAgent: 'amazon-ecs-deploy-task-definition-for-github-actions',
461+
maxAttempts: maxRetries,
462+
retryMode: 'standard'
459463
});
464+
460465
const codedeploy = new CodeDeploy({
461-
customUserAgent: 'amazon-ecs-deploy-task-definition-for-github-actions'
466+
customUserAgent: 'amazon-ecs-deploy-task-definition-for-github-actions',
467+
maxAttempts: maxRetries,
468+
retryMode: 'standard'
462469
});
463470

464471
// Get inputs

0 commit comments

Comments
 (0)