@@ -5804,10 +5804,10 @@ class GitCommandManager {
58045804 return output.exitCode === 0;
58055805 });
58065806 }
5807- fetch(refSpec, fetchDepth) {
5807+ fetch(refSpec, fetchDepth, fetchTags ) {
58085808 return __awaiter(this, void 0, void 0, function* () {
58095809 const args = ['-c', 'protocol.version=2', 'fetch'];
5810- if (!refSpec.some(x => x === refHelper.tagsRefSpec)) {
5810+ if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !fetchTags ) {
58115811 args.push('--no-tags');
58125812 }
58135813 args.push('--prune', '--progress', '--no-recurse-submodules');
@@ -5885,8 +5885,8 @@ class GitCommandManager {
58855885 }
58865886 log1(format) {
58875887 return __awaiter(this, void 0, void 0, function* () {
5888- var args = format ? ['log', '-1', format] : ['log', '-1'];
5889- var silent = format ? false : true;
5888+ const args = format ? ['log', '-1', format] : ['log', '-1'];
5889+ const silent = format ? false : true;
58905890 const output = yield this.execGit(args, false, silent);
58915891 return output.stdout;
58925892 });
@@ -6226,7 +6226,7 @@ function getSource(settings) {
62266226 }
62276227 else {
62286228 const refSpec = refHelper.getRefSpec(settings.ref, settings.commit);
6229- yield git.fetch(refSpec, settings.fetchDepth);
6229+ yield git.fetch(refSpec, settings.fetchDepth, settings.fetchTags );
62306230 }
62316231 core.endGroup();
62326232 // Checkout info
@@ -14572,6 +14572,10 @@ function getInputs() {
1457214572 result.fetchDepth = 0;
1457314573 }
1457414574 core.debug(`fetch depth = ${result.fetchDepth}`);
14575+ // Fetch tags
14576+ result.fetchTags =
14577+ (core.getInput('fetch-tags') || 'false').toUpperCase() === 'TRUE';
14578+ core.debug(`fetch tags = ${result.fetchTags}`);
1457514579 // LFS
1457614580 result.lfs = (core.getInput('lfs') || 'false').toUpperCase() === 'TRUE';
1457714581 core.debug(`lfs = ${result.lfs}`);
0 commit comments