mirror of
https://github.com/nick-fields/retry.git
synced 2026-02-09 22:58:02 +00:00
fix: group log lines for each attempt (#146)
This commit is contained in:
@@ -130,6 +130,7 @@ async function runAction(inputs: Inputs) {
|
|||||||
await validateInputs(inputs);
|
await validateInputs(inputs);
|
||||||
|
|
||||||
for (let attempt = 1; attempt <= inputs.max_attempts; attempt++) {
|
for (let attempt = 1; attempt <= inputs.max_attempts; attempt++) {
|
||||||
|
info(`::group::Attempt ${attempt}`);
|
||||||
try {
|
try {
|
||||||
// just keep overwriting attempts output
|
// just keep overwriting attempts output
|
||||||
setOutput(OUTPUT_TOTAL_ATTEMPTS_KEY, attempt);
|
setOutput(OUTPUT_TOTAL_ATTEMPTS_KEY, attempt);
|
||||||
@@ -156,6 +157,8 @@ async function runAction(inputs: Inputs) {
|
|||||||
info(`Attempt ${attempt} failed. Reason: ${error.message}`);
|
info(`Attempt ${attempt} failed. Reason: ${error.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
info(`::endgroup::`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user