-
-
Notifications
You must be signed in to change notification settings - Fork 230
/
Copy pathindex.cshtml
41 lines (34 loc) · 1.33 KB
/
index.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Order: 70
Title: GitHub Actions
Description: Integration with GitHub Actions
---
<h1 id="included-support">Out of the box support</h1>
<p>
The <a href="/api/Cake.Common.Build/BuildSystemAliases/6C2FCAF0">GitHubActions alias</a>, which returns an
<a href="/api/Cake.Common.Build.GitHubActions/IGitHubActionsProvider">IGitHubActionsProvider</a> instance can be used to interact with the GitHub Actions environment.
</p>
<p>
The following example prints if the build is for a pull request running on GitHub Actions:
</p>
<pre><code class="language-csharp hljs">if (BuildSystem.GitHubActions.IsRunningOnGitHubActions)
{
Information(BuildSystem.GitHubActions.Environment.PullRequest.IsPullRequest);
}
else
{
Information("Not running on GitHub Actions");
}</code></pre>
<div class="alert alert-info">
<p>
See <a href="/api/Cake.Common.Build.GitHubActions/IGitHubActionsProvider">IGitHubActionsProvider</a> for details and available methods to interact with GitHub Actions.
</p>
</div>
<h1 id="included-support">Available 3rd party extensions</h1>
@{
var keywords = new List<string> { "githubactions", "github" };
var extensions =
Documents["Extensions"]
.Where(x =>
keywords.Any(y => x.String("Name").ToLowerInvariant().Contains(y)));
}
@Html.Partial("_ExtensionsList", extensions)