mirror of
https://github.com/actions/checkout.git
synced 2025-03-31 05:20:06 +02: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
|
# Default: true
|
||||||
clean: ''
|
clean: ''
|
||||||
|
|
||||||
|
# Partially clone against a given filter.
|
||||||
|
# Default: null
|
||||||
|
filter: ''
|
||||||
|
|
||||||
# Do a sparse checkout on given patterns. Each pattern should be separated with
|
# Do a sparse checkout on given patterns. Each pattern should be separated with
|
||||||
# new lines
|
# new lines
|
||||||
# Default: null
|
# Default: null
|
||||||
|
|
9
dist/index.js
vendored
9
dist/index.js
vendored
|
@ -1241,8 +1241,12 @@ function getSource(settings) {
|
||||||
// Fetch
|
// Fetch
|
||||||
core.startGroup('Fetching the repository');
|
core.startGroup('Fetching the repository');
|
||||||
const fetchOptions = {};
|
const fetchOptions = {};
|
||||||
if (settings.sparseCheckout)
|
if (settings.filter) {
|
||||||
|
fetchOptions.filter = settings.filter;
|
||||||
|
}
|
||||||
|
else if (settings.sparseCheckout) {
|
||||||
fetchOptions.filter = 'blob:none';
|
fetchOptions.filter = 'blob:none';
|
||||||
|
}
|
||||||
if (settings.fetchDepth <= 0) {
|
if (settings.fetchDepth <= 0) {
|
||||||
// Fetch all branches and tags
|
// Fetch all branches and tags
|
||||||
let refSpec = refHelper.getRefSpecForAllHistory(settings.ref, settings.commit);
|
let refSpec = refHelper.getRefSpecForAllHistory(settings.ref, settings.commit);
|
||||||
|
@ -1719,6 +1723,9 @@ function getInputs() {
|
||||||
// Clean
|
// Clean
|
||||||
result.clean = (core.getInput('clean') || 'true').toUpperCase() === 'TRUE';
|
result.clean = (core.getInput('clean') || 'true').toUpperCase() === 'TRUE';
|
||||||
core.debug(`clean = ${result.clean}`);
|
core.debug(`clean = ${result.clean}`);
|
||||||
|
// Filter
|
||||||
|
result.filter = core.getInput('filter');
|
||||||
|
core.debug(`filter = ${result.filter}`);
|
||||||
// Sparse checkout
|
// Sparse checkout
|
||||||
const sparseCheckout = core.getMultilineInput('sparse-checkout');
|
const sparseCheckout = core.getMultilineInput('sparse-checkout');
|
||||||
if (sparseCheckout.length) {
|
if (sparseCheckout.length) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue