Skip to content

Commit f9f6a78

Browse files
TingluoHuangarturcic
authored andcommitted
Change GITHUB_ACTION to GITHUB_ACTIONS when detect github actions CI.
1 parent 15e5ce9 commit f9f6a78

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/GitVersionCore.Tests/BuildServers/GitHubActionsTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ public void SetUp()
2222
log = new NullLog();
2323

2424
environment = new TestEnvironment();
25-
environment.SetEnvironmentVariable("GITHUB_ACTION", Guid.NewGuid().ToString());
25+
environment.SetEnvironmentVariable("GITHUB_ACTIONS", "true");
2626
}
2727

2828
[TearDown]
2929
public void TearDown()
3030
{
31-
environment.SetEnvironmentVariable("GITHUB_ACTION", null);
31+
environment.SetEnvironmentVariable("GITHUB_ACTIONS", null);
3232
}
3333

3434
[Test]
@@ -48,7 +48,7 @@ public void CanApplyToCurrentContextShouldBeTrueWhenEnvironmentVariableIsSet()
4848
public void CanApplyToCurrentContextShouldBeFalseWhenEnvironmentVariableIsNotSet()
4949
{
5050
// Arrange
51-
environment.SetEnvironmentVariable("GITHUB_ACTION", "");
51+
environment.SetEnvironmentVariable("GITHUB_ACTIONS", "");
5252
var buildServer = new GitHubActions(environment, log);
5353

5454
// Act

src/GitVersionCore/BuildServers/GitHubActions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public GitHubActions(IEnvironment environment, ILog log) : base(environment, log
1111
{
1212
}
1313

14-
public const string EnvironmentVariableName = "GITHUB_ACTION";
14+
public const string EnvironmentVariableName = "GITHUB_ACTIONS";
1515
protected override string EnvironmentVariable { get; } = EnvironmentVariableName;
1616

1717
public override string GenerateSetVersionMessage(VersionVariables variables)

0 commit comments

Comments
 (0)