Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
namespace Cake.Frosting.Issues.Recipe;

using System;
using System.IO;
using System.Net.Http;
using Cake.Common;
using Cake.Common.Build;
using Cake.Common.Diagnostics;
using Cake.Common.IO;
using Cake.Core.IO;
using System.Net;
using System.Net.Http;

Check warning on line 12 in Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/GitHubActionsBuildServer.cs

View workflow job for this annotation

GitHub Actions / Build

The using directive for 'System.Net.Http' appeared previously in this namespace

Check warning on line 12 in Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/GitHubActionsBuildServer.cs

View workflow job for this annotation

GitHub Actions / Build

The using directive for 'System.Net.Http' appeared previously in this namespace

Check warning on line 12 in Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/GitHubActionsBuildServer.cs

View workflow job for this annotation

GitHub Actions / Build

The using directive for 'System.Net.Http' appeared previously in this namespace

Check warning on line 12 in Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/GitHubActionsBuildServer.cs

View workflow job for this annotation

GitHub Actions / Build

The using directive for 'System.Net.Http' appeared previously in this namespace

/// <summary>
/// Support for builds running on GitHub Actions.
Expand Down Expand Up @@ -138,10 +141,19 @@
{
context.NotNull();

if (context.Parameters.BuildServer.ShouldPublishFullIssuesReport &&
context.State.FullIssuesReport != null &&
context.FileExists(context.State.FullIssuesReport))
{
context.GitHubActions().Commands.UploadArtifact(context.State.FullIssuesReport, "Issues Report");
}

if (context.Parameters.BuildServer.ShouldPublishSarifReport &&
context.State.SarifReport != null &&
context.FileExists(context.State.SarifReport))
{
context.GitHubActions().Commands.UploadArtifact(context.State.SarifReport, "SARIF Report");

UploadSarifToCodeScanning(context);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,20 @@ public class GitHubActionsBuildServer : BaseBuildServer
context.NotNull();
data.NotNull();

if (IssuesParameters.BuildServer.ShouldPublishFullIssuesReport &&
data.FullIssuesReport != null &&
context.FileExists(data.FullIssuesReport))
{
context.GitHubActions().Commands.UploadArtifact(data.FullIssuesReport, "Issues Report");
}

if (IssuesParameters.BuildServer.ShouldPublishSarifReport &&
data.SarifReport != null &&
context.FileExists(data.SarifReport))
{
context.GitHubActions().Commands.UploadArtifact(data.SarifReport, "SARIF Report");

// Also upload SARIF to GitHub code scanning
UploadSarifToCodeScanning(context, data);
}
}
Expand Down Expand Up @@ -170,7 +180,7 @@ public class GitHubActionsBuildServer : BaseBuildServer
var requestBody = new
{
commit_sha = data.CommitId,
ref_,
ref_ = ref_,
sarif = sarifBase64,
tool_name = "Cake.Issues.Recipe"
};
Expand Down
Loading