mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-27 14:29:54 +02:00
add ssh support (#163)
This commit is contained in:
parent
80602fafba
commit
b2e6b7ed13
10 changed files with 837 additions and 58 deletions
|
@ -18,9 +18,13 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
core.info(
|
||||
`Syncing repository: ${settings.repositoryOwner}/${settings.repositoryName}`
|
||||
)
|
||||
const repositoryUrl = `https://${hostname}/${encodeURIComponent(
|
||||
settings.repositoryOwner
|
||||
)}/${encodeURIComponent(settings.repositoryName)}`
|
||||
const repositoryUrl = settings.sshKey
|
||||
? `git@${hostname}:${encodeURIComponent(
|
||||
settings.repositoryOwner
|
||||
)}/${encodeURIComponent(settings.repositoryName)}.git`
|
||||
: `https://${hostname}/${encodeURIComponent(
|
||||
settings.repositoryOwner
|
||||
)}/${encodeURIComponent(settings.repositoryName)}`
|
||||
|
||||
// Remove conflicting file path
|
||||
if (fsHelper.fileExistsSync(settings.repositoryPath)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue