mirror of
https://github.com/actions/checkout.git
synced 2025-08-23 02:38:10 +03:00
Compare commits
3 commits
4a3640cb41
...
527133ddb9
Author | SHA1 | Date | |
---|---|---|---|
|
527133ddb9 | ||
|
ff7abcd0c3 | ||
|
e7667abffb |
4 changed files with 22 additions and 2 deletions
|
@ -2,7 +2,11 @@
|
|||
|
||||
# Checkout V5
|
||||
|
||||
Checkout v5 now supports Node.js 24
|
||||
## What's new
|
||||
|
||||
- Updated to the node24 runtime
|
||||
- This requires a minimum Actions Runner version of [v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1) to run.
|
||||
|
||||
|
||||
# Checkout V4
|
||||
|
||||
|
@ -154,9 +158,10 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
|||
# Scenarios
|
||||
|
||||
- [Checkout V5](#checkout-v5)
|
||||
- [What's new](#whats-new)
|
||||
- [Checkout V4](#checkout-v4)
|
||||
- [Note](#note)
|
||||
- [What's new](#whats-new)
|
||||
- [What's new](#whats-new-1)
|
||||
- [Usage](#usage)
|
||||
- [Scenarios](#scenarios)
|
||||
- [Fetch only the root files](#fetch-only-the-root-files)
|
||||
|
|
|
@ -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…
Add table
Reference in a new issue