From 694ae12b238cb952320c6e733d36c8fd303c5710 Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Tue, 12 Nov 2024 14:56:24 -0500 Subject: [PATCH] Expose ENV for cache service v2. (#3548) --- src/Runner.Worker/Handlers/NodeScriptActionHandler.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs index fa479bb7d..a399f13d1 100644 --- a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs +++ b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs @@ -72,6 +72,11 @@ namespace GitHub.Runner.Worker.Handlers Environment["ACTIONS_RESULTS_URL"] = resultsUrl; } + if (ExecutionContext.Global.Variables.GetBoolean("actions_uses_cache_service_v2") ?? false) + { + Environment["ACTIONS_CACHE_SERVICE_V2"] = bool.TrueString; + } + // Resolve the target script. string target = null; if (stage == ActionRunStage.Main)