Skip to content

Commit aa230e7

Browse files
committed
Improve error reporting in github actions
1 parent fc9808c commit aa230e7

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

Fun.Build/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
## [1.1.12] - 2024-10-21
6+
7+
- Improve error reporting in github actions
8+
59
## [1.1.11] - 2024-10-21
610

711
- Improve error reporting in github actions

Fun.Build/PipelineContextExtensions.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ module PipelineContextExtensionsInternal =
5959
}
6060

6161

62-
member this.GetErrorPrefix() = if this.EnvVars.ContainsKey("GITHUB_ENV") then "::error::" else "Error: "
62+
member this.GetErrorPrefix() =
63+
if this.EnvVars.ContainsKey("GITHUB_ENV") then
64+
let title = "[PIPELINE] " + this.Name.Replace(",", "_")
65+
$"::error title={title}::"
66+
else
67+
"Error: "
6368

6469

6570
member this.RunStages(stages: StageContext seq, cancelToken: Threading.CancellationToken, ?failfast: bool) =

Fun.Build/StageContextExtensions.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ module StageContextExtensionsInternal =
6464

6565
member ctx.GetErrorPrefix() =
6666
match ctx.TryGetEnvVar("GITHUB_ENV") with
67-
| ValueSome _ -> "::error::"
67+
| ValueSome _ ->
68+
let title = "[STAGE] " + ctx.GetNamePath().Replace(",", "_")
69+
$"::error title={title}::"
6870
| _ -> "Error: "
6971

7072

0 commit comments

Comments
 (0)