TedToolkit.CiContext.GitHubActions
2026.8.14
dotnet add package TedToolkit.CiContext.GitHubActions --version 2026.8.14
NuGet\Install-Package TedToolkit.CiContext.GitHubActions -Version 2026.8.14
<PackageReference Include="TedToolkit.CiContext.GitHubActions" Version="2026.8.14" />
<PackageVersion Include="TedToolkit.CiContext.GitHubActions" Version="2026.8.14" />
<PackageReference Include="TedToolkit.CiContext.GitHubActions" />
paket add TedToolkit.CiContext.GitHubActions --version 2026.8.14
#r "nuget: TedToolkit.CiContext.GitHubActions, 2026.8.14"
#:package TedToolkit.CiContext.GitHubActions@2026.8.14
#addin nuget:?package=TedToolkit.CiContext.GitHubActions&version=2026.8.14
#tool nuget:?package=TedToolkit.CiContext.GitHubActions&version=2026.8.14
TedToolkit.CiContext.GitHubActions
TedToolkit.CiContext.GitHubActions provides strongly typed, on-demand access to GitHub Actions default environment variables in the current process while keeping its public API in the concise TedToolkit.GitHub namespace.
Install
dotnet add package TedToolkit.CiContext.GitHubActions
Quick Start
using TedToolkit.GitHub;
if (GitHubActions.General.Detected is true)
{
Console.WriteLine($"Repository: {GitHubActions.Repository.NameWithOwner}");
Console.WriteLine($"Run: {GitHubActions.Run.Id}");
Console.WriteLine($"Workspace: {GitHubActions.Repository.Workspace}");
}
No context needs to be created. The root and its semantic groups are nested static classes, and every terminal property reads its environment variable when accessed.
| GitHub variable | C# property | Type |
|---|---|---|
GITHUB_ACTOR_ID |
GitHubActions.Actor.Id |
long? |
GITHUB_EVENT_PATH |
GitHubActions.Event.PayloadPath |
FilePath? |
GITHUB_REF_PROTECTED |
GitHubActions.Ref.Protected |
bool? |
GITHUB_REF_TYPE |
GitHubActions.Ref.Type |
GitHubActionsRefType? |
GITHUB_RETENTION_DAYS |
GitHubActions.Run.Retention |
TimeSpan? |
GITHUB_API_URL |
GitHubActions.Server.ApiUrl |
Uri? |
RUNNER_OS |
GitHubActions.Runner.OperatingSystem |
GitHubActionsRunnerOperatingSystem? |
GITHUB_STEP_SUMMARY |
GitHubActions.WorkflowCommands.StepSummaryFile |
FilePath? |
Missing And Malformed Values
An unavailable variable returns null. A present value that does not match its documented type throws FormatException without including the original value:
using TedToolkit.Ci;
string? rawRunId = CiEnvironment.GetRawValue("GITHUB_RUN_ID");
The common raw accessor also supports custom and newly introduced variables. Do not log its result unless the variable's sensitivity is known.
Scope
The typed surface covers the 46 names in GitHub's current rendered default-variable reference. It does not model expression contexts, retrieve secrets, expose GITHUB_TOKEN, parse event payloads, evaluate workflows, or write workflow-command files.
The maintained github/docs Markdown contains the same 46 names as of 2026-08-14. Synchronization snapshots both sources independently so any future difference is executable drift evidence.
Use reflection over terminal properties carrying the shared CiVariableAttribute when tooling needs exact names. Closed documented string sets declare their exact tokens with CiEnumValueAttribute.
Target Frameworks
net6.0, net7.0, net8.0, net9.0, net10.0, net472, net48, netstandard2.0, and netstandard2.1.
Related Documentation
License
Licensed under LGPL-3.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- TedToolkit.CiContext (>= 2026.8.14)
-
.NETFramework 4.8
- TedToolkit.CiContext (>= 2026.8.14)
-
.NETStandard 2.0
- TedToolkit.CiContext (>= 2026.8.14)
-
.NETStandard 2.1
- TedToolkit.CiContext (>= 2026.8.14)
-
net10.0
- TedToolkit.CiContext (>= 2026.8.14)
-
net6.0
- TedToolkit.CiContext (>= 2026.8.14)
-
net7.0
- TedToolkit.CiContext (>= 2026.8.14)
-
net8.0
- TedToolkit.CiContext (>= 2026.8.14)
-
net9.0
- TedToolkit.CiContext (>= 2026.8.14)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.8.14 | 104 | 8/14/2026 |