Skip to content

Commit 0900b0d

Browse files
fix: group log lines for each attempt
1 parent dfb235a commit 0900b0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ async function runAction(inputs: Inputs) {
130130
await validateInputs(inputs);
131131

132132
for (let attempt = 1; attempt <= inputs.max_attempts; attempt++) {
133+
info(`::group::Attempt ${attempt}`);
133134
try {
134135
// just keep overwriting attempts output
135136
setOutput(OUTPUT_TOTAL_ATTEMPTS_KEY, attempt);
@@ -156,6 +157,8 @@ async function runAction(inputs: Inputs) {
156157
info(`Attempt ${attempt} failed. Reason: ${error.message}`);
157158
}
158159
}
160+
} finally {
161+
info(`::endgroup::`);
159162
}
160163
}
161164
}
@@ -184,4 +187,4 @@ runAction(inputs)
184187
// if continue_on_error, exit with exact error code else exit gracefully
185188
// mimics native continue-on-error that is not supported in composite actions
186189
process.exit(inputs.continue_on_error ? 0 : exitCode);
187-
});
190+
});

0 commit comments

Comments
 (0)