mirror of
https://github.com/actions/checkout.git
synced 2025-03-28 11:00:05 +01:00
added build file
This commit is contained in:
parent
99fc22de1f
commit
7e6f3d7a1e
2 changed files with 12 additions and 1 deletions
|
@ -74,6 +74,10 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
|
|||
# Default: true
|
||||
clean: ''
|
||||
|
||||
# Partially clone against a given filter.
|
||||
# Default: null
|
||||
filter: ''
|
||||
|
||||
# Do a sparse checkout on given patterns. Each pattern should be separated with
|
||||
# new lines
|
||||
# Default: null
|
||||
|
|
9
dist/index.js
vendored
9
dist/index.js
vendored
|
@ -1241,8 +1241,12 @@ function getSource(settings) {
|
|||
// Fetch
|
||||
core.startGroup('Fetching the repository');
|
||||
const fetchOptions = {};
|
||||
if (settings.sparseCheckout)
|
||||
if (settings.filter) {
|
||||
fetchOptions.filter = settings.filter;
|
||||
}
|
||||
else if (settings.sparseCheckout) {
|
||||
fetchOptions.filter = 'blob:none';
|
||||
}
|
||||
if (settings.fetchDepth <= 0) {
|
||||
// Fetch all branches and tags
|
||||
let refSpec = refHelper.getRefSpecForAllHistory(settings.ref, settings.commit);
|
||||
|
@ -1719,6 +1723,9 @@ function getInputs() {
|
|||
// Clean
|
||||
result.clean = (core.getInput('clean') || 'true').toUpperCase() === 'TRUE';
|
||||
core.debug(`clean = ${result.clean}`);
|
||||
// Filter
|
||||
result.filter = core.getInput('filter');
|
||||
core.debug(`filter = ${result.filter}`);
|
||||
// Sparse checkout
|
||||
const sparseCheckout = core.getMultilineInput('sparse-checkout');
|
||||
if (sparseCheckout.length) {
|
||||
|
|
Loading…
Add table
Reference in a new issue