Added names and dirs outputs.
This commit is contained in:
@@ -121,8 +121,11 @@ if (artifactsToDownload.Length is 0)
|
||||
return 1;
|
||||
}
|
||||
|
||||
StringBuilder namesBuilder = new();
|
||||
namesBuilder.AppendLine("downloadedArtifactNames<<EOF");
|
||||
|
||||
StringBuilder artifactsBuilder = new();
|
||||
artifactsBuilder.AppendLine("downloadedArtifacts<<EOF");
|
||||
artifactsBuilder.AppendLine("downloadedArtifactPaths<<EOF");
|
||||
|
||||
StringBuilder artifactsDirsBuilder = new();
|
||||
artifactsDirsBuilder.AppendLine("downloadedArtifactDirs<<EOF");
|
||||
@@ -150,7 +153,8 @@ foreach (ActionArtifact artifact in artifactsToDownload)
|
||||
fs.Close();
|
||||
|
||||
Console.WriteLine($"Downloaded: {fileName}");
|
||||
artifactsBuilder.AppendLine(fileName);
|
||||
namesBuilder.AppendLine(fileName);
|
||||
artifactsBuilder.AppendLine(Path.GetFullPath(fileName));
|
||||
|
||||
if (string.IsNullOrEmpty(unzipDir)) continue;
|
||||
string fullUnzipDir = Path.Combine(unzipDir, artifact.Name);
|
||||
@@ -165,17 +169,21 @@ foreach (ActionArtifact artifact in artifactsToDownload)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namesBuilder.AppendLine("EOF");
|
||||
artifactsBuilder.AppendLine("EOF");
|
||||
artifactsDirsBuilder.AppendLine("EOF");
|
||||
|
||||
string? githubOutput = configuration["GITHUB_OUTPUT"];
|
||||
if (!string.IsNullOrEmpty(githubOutput))
|
||||
{
|
||||
await File.AppendAllTextAsync(githubOutput, namesBuilder.ToString());
|
||||
await File.AppendAllTextAsync(githubOutput, artifactsBuilder.ToString());
|
||||
await File.AppendAllTextAsync(githubOutput, artifactsDirsBuilder.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(namesBuilder.ToString());
|
||||
Console.WriteLine(artifactsBuilder.ToString());
|
||||
Console.WriteLine(artifactsDirsBuilder.ToString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user