mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
| .. | ||
| action.yml | ||
| README.md | ||
Flaky Retry Action
A GitHub Action that retries a command if it fails with a specific error string.
Inputs
command(required): The command to runerror_string_contains(required): Retry only if error output contains this stringretry_count(optional): Number of times to retry on failure (default: 3)
Usage
- name: Run flaky test
uses: ./.github/actions/flaky-retry
with:
command: 'cargo test my_flaky_test'
error_string_contains: 'connection timeout'
retry_count: 5
Behavior
- Runs the specified command
- If the command succeeds (exit code 0), the action succeeds immediately
- If the command fails (non-zero exit code):
- Checks if the error output contains the specified string
- If it does, retries up to
retry_counttimes - If it doesn't, fails immediately without retrying
- After all retries are exhausted, the action fails with the last exit code