Output Cake tasks summary to GitHub actions step summary #4844
|
Is there anything built in to report Cake tasks summary to GitHub actions summary? Adding this: to the step summary |
Replies: 2 comments 3 replies
|
Not built-in, but you can use https://github.com/cake-build/cakesdk-example/actions/runs/26491543109 |
|
I do not think Cake has a built-in switch that automatically writes the task summary to the GitHub Actions step summary, but you can write to the file GitHub exposes through Example shape: var summaryFile = EnvironmentVariable("GITHUB_STEP_SUMMARY");
Teardown(context =>
{
if (!string.IsNullOrWhiteSpace(summaryFile))
{
var md = """
## Cake task summary
| Task | Status |
| ---- | ------ |
| Build-Solution | Succeeded |
| Run-Tests | Succeeded |
""";
System.IO.File.AppendAllText(summaryFile, md + Environment.NewLine);
}
});If you want the exact duration table Cake prints at the end, the pragmatic approach is to also run Cake with a log file/tee in the workflow and append the relevant block to |

Not built-in, but you can use
Cake.BuildSystems.ModuleExample:
https://github.com/cake-build/cakesdk-example/blob/6fa0751d24a4c2ef63aa78c084ccef3b1687c93c/cake.cs#L2
https://github.com/cake-build/cakesdk-example/actions/runs/26491543109