mirror of
https://github.com/actions/runner.git
synced 2025-12-20 06:29:53 +00:00
GitHub Actions Runner
This commit is contained in:
17
src/Runner.Worker/RunnerContext.cs
Normal file
17
src/Runner.Worker/RunnerContext.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using GitHub.DistributedTask.Pipelines.ContextData;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GitHub.Runner.Worker
|
||||
{
|
||||
public sealed class RunnerContext : DictionaryContextData, IEnvironmentContextData
|
||||
{
|
||||
public IEnumerable<KeyValuePair<string, string>> GetRuntimeEnvironmentVariables()
|
||||
{
|
||||
foreach (var data in this)
|
||||
{
|
||||
yield return new KeyValuePair<string, string>($"RUNNER_{data.Key.ToUpperInvariant()}", data.Value as StringContextData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user