Skip to content

Commit

Permalink
Merge pull request #40 from CHG-MERIDIAN/UpdateBuild
Browse files Browse the repository at this point in the history
Fix master detection
  • Loading branch information
twenzel authored Jun 25, 2020
2 parents 9b75913 + f0e1452 commit 14afbd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
with:
dotnet-version: 3.1.301

- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 11

- name: Run Cake script
uses: cake-build/[email protected]
with:
Expand Down
3 changes: 2 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var testResultsPath = System.IO.Path.Combine(System.IO.Path.GetFullPath(outputDi
var nugetPublishFeed = "https://api.nuget.org/v3/index.json";

var isLocalBuild = BuildSystem.IsLocalBuild;
var isMasterBranch = StringComparer.OrdinalIgnoreCase.Equals("master", BuildSystem.GitHubActions.Environment.Workflow.Ref);
var isMasterBranch = StringComparer.OrdinalIgnoreCase.Equals("refs/heads/master", BuildSystem.GitHubActions.Environment.Workflow.Ref);
var isPullRequest = BuildSystem.GitHubActions.Environment.PullRequest.IsPullRequest;
var runSonar = !string.IsNullOrWhiteSpace(sonarLogin);

Expand All @@ -38,6 +38,7 @@ Setup(context =>
Information($"Master branch: {isMasterBranch}");
Information($"Pull request: {isPullRequest}");
Information($"Run sonar: {runSonar}");
Information($"ref: {BuildSystem.GitHubActions.Environment.Workflow.Ref}");
});

Task("Clean")
Expand Down

0 comments on commit 14afbd2

Please sign in to comment.