Compare commits

...

2 Commits

Author SHA1 Message Date
Thomas Boop
7e583ee157 swap to warning 2024-02-12 17:37:14 -05:00
Thomas Boop
1c69531e97 stub for artifact work 2024-02-12 17:29:17 -05:00

View File

@@ -780,6 +780,16 @@ namespace GitHub.Runner.Worker
Directory.CreateDirectory(destDirectory); Directory.CreateDirectory(destDirectory);
executionContext.Output($"Download action repository '{downloadInfo.NameWithOwner}@{downloadInfo.Ref}' (SHA:{downloadInfo.ResolvedSha})"); executionContext.Output($"Download action repository '{downloadInfo.NameWithOwner}@{downloadInfo.Ref}' (SHA:{downloadInfo.ResolvedSha})");
} }
// TODO We will want to make sure to feature flag this. We have the execution context easy to do.
// See "DistributedTask.UseActionArchiveCache" for how we can do that in this same function, requires server side changes
// TODO figure out the exact refs and sha's we care about.
// We can probably check if it starts with v1 or v2, and have an allowlist of a few shas.
if (downloadInfo.NameWithOwner == "actions/upload-artifact" &&
(downloadInfo.Ref.StartsWith("v1.") || (downloadInfo.Ref.StartsWith("v2.") // '.' is important to avoid v10 conflict
|| downloadInfo.Ref == "v1" || downloadInfo.Ref == "v2")))
{
executionContext.Warning($"'{downloadInfo.NameWithOwner}@{downloadInfo.Ref}' is deprecated and will be disabled on xyz. Please upgrade to 'v4'. For more information, see (blogpost here)");
}
//download and extract action in a temp folder and rename it on success //download and extract action in a temp folder and rename it on success
string tempDirectory = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Actions), "_temp_" + Guid.NewGuid()); string tempDirectory = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Actions), "_temp_" + Guid.NewGuid());