From 9031c0bccefb6b191dc2fb2c915f511195eaaa6c Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Mon, 29 Sep 2025 12:58:06 -0300 Subject: [PATCH] Align with future envvar for job id See https://github.com/actions/runner/pull/4053. --- src/dotnet-trx/TrxCommand.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dotnet-trx/TrxCommand.cs b/src/dotnet-trx/TrxCommand.cs index 20c3982..37c27a0 100644 --- a/src/dotnet-trx/TrxCommand.cs +++ b/src/dotnet-trx/TrxCommand.cs @@ -318,7 +318,8 @@ static void GitHubReport(TrxSettings settings, Summary summary, StringBuilder de // Some day, it might just show-up and we'd be forwards compatible. // See https://github.com/orgs/community/discussions/129314 and https://github.com/actions/runner/issues/324 - var jobId = Environment.GetEnvironmentVariable("GITHUB_JOB_ID"); + // Pending PR that introduces this envvar: https://github.com/actions/runner/pull/4053 + var jobId = Environment.GetEnvironmentVariable("JOB_CHECK_RUN_ID"); // Provide a mechanism that would work on matrix in the meantime if (Environment.GetEnvironmentVariable("GH_JOB_NAME") is { Length: > 0 } ghJobName)