mirror of
https://github.com/actions/checkout.git
synced 2025-08-14 10:05:07 +00:00
Merge e7667abffb0c8a9a3777db9276d640bfeb8b68ff into ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
This commit is contained in:
commit
527133ddb9
@ -98,6 +98,10 @@ inputs:
|
||||
github-server-url:
|
||||
description: The base URL for the GitHub instance that you are trying to clone from, will use environment defaults to fetch from the same instance that the workflow is running from unless specified. Example URLs are https://github.com or https://my-ghes-server.example.com
|
||||
required: false
|
||||
skip-cleanup:
|
||||
description: Skips the cleanup phase on post action hook
|
||||
required: false
|
||||
default: false
|
||||
outputs:
|
||||
ref:
|
||||
description: 'The branch, tag or SHA that was checked out'
|
||||
|
@ -118,4 +118,9 @@ export interface IGitSourceSettings {
|
||||
* User override on the GitHub Server/Host URL that hosts the repository to be cloned
|
||||
*/
|
||||
githubServerUrl: string | undefined
|
||||
|
||||
/**
|
||||
* Disable the post action cleanup phase
|
||||
*/
|
||||
skipCleanup: boolean
|
||||
}
|
||||
|
@ -30,6 +30,12 @@ async function run(): Promise<void> {
|
||||
}
|
||||
|
||||
async function cleanup(): Promise<void> {
|
||||
const sourceSettings = await inputHelper.getInputs()
|
||||
|
||||
if (sourceSettings.skipCleanup) {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await gitSourceProvider.cleanup(stateHelper.RepositoryPath)
|
||||
} catch (error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user