Skip to content

Commit 4e5f8e0

Browse files
authored
Use https remotes for assembler clones (#723)
* Use https remotes for assembler clones * prefer GITHUB_ACTIONS over GITHUB_ACTION always
1 parent c5af8e4 commit 4e5f8e0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

build/Targets.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ let private publishContainers _ =
9494
"-p"; $"ContainerRepository=elastic/%s{project}"
9595
]
9696
let registry =
97-
match Environment.environVarOrNone "GITHUB_ACTION" with
97+
match Environment.environVarOrNone "GITHUB_ACTIONS" with
9898
| None -> []
9999
| Some _ -> [
100100
"-p"; "ContainerRegistry=ghcr.io"

src/Elastic.Documentation.Tooling/Diagnostics/Console/GithubAnnotationOutput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void Write(Diagnostic diagnostic)
1414
{
1515
if (githubActions == null)
1616
return;
17-
if (string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("GITHUB_ACTION")))
17+
if (string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("GITHUB_ACTIONS")))
1818
return;
1919
var properties = new AnnotationProperties
2020
{

src/docs-assembler/Sourcing/RepositoryCloner.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ private void CloneRepository(Repository? repository, string name, ConcurrentDict
4949
{
5050
repository ??= new Repository();
5151
repository.CurrentBranch ??= "main";
52-
repository.Origin ??= $"[email protected]:elastic/{name}.git";
52+
repository.Origin ??= !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_ACTIONS"))
53+
? $"https://github.com/elastic/{name}.git"
54+
: $"[email protected]:elastic/{name}.git";
5355

5456
var checkoutFolder = Path.Combine(context.OutputDirectory.FullName, name);
5557
var relativePath = Path.GetRelativePath(Paths.Root.FullName, checkoutFolder);

0 commit comments

Comments
 (0)