Skip to content

Commit 70548cb

Browse files
Avoid SSH clones in GitHub actions
1 parent 40775b2 commit 70548cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.maintenance/clone-all-repositories.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@
4040

4141
if ( ! is_dir( $repository->name ) ) {
4242
printf( "Fetching \033[32mwp-cli/{$repository->name}\033[0m...\n" );
43-
system( "git clone {$repository->ssh_url}" );
43+
$clone_url = getenv( 'GITHUB_ACTION' ) ? $repository->clone_url : $repository->ssh_url;
44+
system( "git clone {$clone_url}" );
4445
}
45-
46+
4647
$update_folders[] = $repository->name;
4748
}
4849

0 commit comments

Comments
 (0)