@@ -7533,10 +7533,10 @@ class GitCommandManager {
75337533 return output.exitCode === 0;
75347534 });
75357535 }
7536- fetch(refSpec, fetchDepth) {
7536+ fetch(refSpec, fetchDepth, fetchTags ) {
75377537 return __awaiter(this, void 0, void 0, function* () {
75387538 const args = ['-c', 'protocol.version=2', 'fetch'];
7539- if (!refSpec.some(x => x === refHelper.tagsRefSpec)) {
7539+ if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !fetchTags ) {
75407540 args.push('--no-tags');
75417541 }
75427542 args.push('--prune', '--progress', '--no-recurse-submodules');
@@ -7614,8 +7614,8 @@ class GitCommandManager {
76147614 }
76157615 log1(format) {
76167616 return __awaiter(this, void 0, void 0, function* () {
7617- var args = format ? ['log', '-1', format] : ['log', '-1'];
7618- var silent = format ? false : true;
7617+ const args = format ? ['log', '-1', format] : ['log', '-1'];
7618+ const silent = format ? false : true;
76197619 const output = yield this.execGit(args, false, silent);
76207620 return output.stdout;
76217621 });
@@ -18521,6 +18521,10 @@ function getInputs() {
1852118521 result.fetchDepth = 0;
1852218522 }
1852318523 core.debug(`fetch depth = ${result.fetchDepth}`);
18524+ // Fetch tags
18525+ result.fetchTags =
18526+ (core.getInput('fetch-tags') || 'false').toUpperCase() === 'TRUE';
18527+ core.debug(`fetch tags = ${result.fetchTags}`);
1852418528 // LFS
1852518529 result.lfs = (core.getInput('lfs') || 'false').toUpperCase() === 'TRUE';
1852618530 core.debug(`lfs = ${result.lfs}`);
@@ -31981,7 +31985,7 @@ function getSource(settings) {
3198131985 }
3198231986 else {
3198331987 const refSpec = refHelper.getRefSpec(settings.ref, settings.commit);
31984- yield git.fetch(refSpec, settings.fetchDepth);
31988+ yield git.fetch(refSpec, settings.fetchDepth, settings.fetchTags );
3198531989 }
3198631990 core.endGroup();
3198731991 // Checkout info
0 commit comments