feat: Add retry mechanism with configurable attempts, wait time, and timeout

New input parameters:
- max-attempts (default: 1) - Maximum number of build attempts
- retry-wait-seconds (default: 0) - Delay between retry attempts
- timeout-minutes (default: 0) - Timeout per attempt (0 = no timeout)

Implementation:
- Wraps build execution in retry loop with comprehensive logging
- Adds timeout support per attempt using Promise.race()
- Fully backward compatible (default values maintain current behavior)
- Adds 2 test cases

Signed-off-by: Mor Weinberger <test@example.com>
This commit is contained in:
Mor Weinberger 2025-10-28 10:26:39 +02:00
parent 9e436ba9f2
commit e4bf8b61e3
7 changed files with 201 additions and 26 deletions

View file

@ -111,6 +111,18 @@ inputs:
description: "GitHub Token used to authenticate against a repository for Git context"
default: ${{ github.token }}
required: false
max-attempts:
description: "Maximum number of build attempts (including initial attempt)"
required: false
default: '1'
retry-wait-seconds:
description: "Number of seconds to wait between retry attempts"
required: false
default: '5'
timeout-minutes:
description: "Timeout for each build attempt in minutes (0 means no timeout)"
required: false
default: '0'
outputs:
imageid: