1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2025-04-26 22:09:55 +02:00

Add set-safe-directory input to allow customers to take control. (#770)

* Add set-safe-directory input to allow customers to take control.
This commit is contained in:
Tingluo Huang 2022-04-20 21:37:43 -04:00 committed by GitHub
parent dcd71f6466
commit 0ffe6f9c55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 144 additions and 32 deletions

View file

@ -122,5 +122,8 @@ export async function getInputs(): Promise<IGitSourceSettings> {
// Workflow organization ID
result.workflowOrganizationId = await workflowContextHelper.getOrganizationId()
// Set safe.directory in git global config.
result.setSafeDirectory =
(core.getInput('set-safe-directory') || 'true').toUpperCase() === 'TRUE'
return result
}