mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-21 09:10:16 +03:00
Adds force-api-download option
Signed-off-by: CollinM <collinmcneese@github.com>
This commit is contained in:
parent
e6d535c99c
commit
a24ff48c7b
7 changed files with 23 additions and 3 deletions
5
dist/index.js
vendored
5
dist/index.js
vendored
|
@ -7429,7 +7429,7 @@ function getSource(settings) {
|
|||
if (isExisting) {
|
||||
yield gitDirectoryHelper.prepareExistingDirectory(git, settings.repositoryPath, repositoryUrl, settings.clean, settings.ref);
|
||||
}
|
||||
if (!git) {
|
||||
if (!git || settings.forceApiDownload) {
|
||||
// Downloading using REST API
|
||||
core.info(`The repository will be downloaded using the GitHub REST API`);
|
||||
core.info(`To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH`);
|
||||
|
@ -17390,6 +17390,9 @@ function getInputs() {
|
|||
// Determine the GitHub URL that the repository is being hosted from
|
||||
result.githubServerUrl = core.getInput('github-server-url');
|
||||
core.debug(`GitHub Host URL = ${result.githubServerUrl}`);
|
||||
// Toggle force-api-download
|
||||
result.forceApiDownload =
|
||||
(core.getInput('force-api-download') || 'false').toUpperCase() === 'TRUE';
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue