Test
This commit is contained in:
@@ -37,11 +37,6 @@ string password = configuration["password"] ?? string.Empty;
|
|||||||
|
|
||||||
string repoFullName = configuration["repoFullName"] ?? string.Empty;
|
string repoFullName = configuration["repoFullName"] ?? string.Empty;
|
||||||
|
|
||||||
foreach (string key in configuration.AsEnumerable().Select(kvp => kvp.Key))
|
|
||||||
{
|
|
||||||
Console.WriteLine($"::set-output name={key}::{configuration[key]}");
|
|
||||||
}
|
|
||||||
|
|
||||||
string[] repoParts = repoFullName.Split('/');
|
string[] repoParts = repoFullName.Split('/');
|
||||||
if (repoParts.Length != 2)
|
if (repoParts.Length != 2)
|
||||||
{
|
{
|
||||||
@@ -109,11 +104,16 @@ if (actionWorkflowRun is null)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IGetArtifactsOfRunApiResponse artifacts = await repositoryApi.GetArtifactsOfRunOrDefaultAsync(repoOwner, repoName, (int)actionWorkflowRun.Id!, string.Empty, CancellationToken.None);
|
IGetArtifactsOfRunApiResponse artifacts = await repositoryApi.GetArtifactsOfRunOrDefaultAsync(repoOwner, repoName, (int)actionWorkflowRun.Id!, string.Empty, CancellationToken.None);
|
||||||
if (!artifacts.TryOk(out ActionArtifactsResponse artifactsResponse) || artifactsResponse.TotalCount is 0)
|
if (!artifacts.TryOk(out ActionArtifactsResponse artifactsResponse))
|
||||||
{
|
{
|
||||||
Console.WriteLine("Failed to retrieve artifacts.");
|
Console.WriteLine("Failed to retrieve artifacts.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (artifactsResponse.Artifacts.Count == 0)
|
||||||
|
{
|
||||||
|
Console.WriteLine("No artifacts found for the specified workflow run.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
IEnumerable<ActionArtifact> artifactsToDownload = artifactsResponse.Artifacts.Where(a => artifactRegex.IsMatch(a.Name));
|
IEnumerable<ActionArtifact> artifactsToDownload = artifactsResponse.Artifacts.Where(a => artifactRegex.IsMatch(a.Name));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user