@@ -6959,10 +6959,10 @@ class GitCommandManager {
69596959 return output.exitCode === 0;
69606960 });
69616961 }
6962- fetch(refSpec, fetchDepth) {
6962+ fetch(refSpec, fetchDepth, fetchTags ) {
69636963 return __awaiter(this, void 0, void 0, function* () {
69646964 const args = ['-c', 'protocol.version=2', 'fetch'];
6965- if (!refSpec.some(x => x === refHelper.tagsRefSpec)) {
6965+ if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !fetchTags ) {
69666966 args.push('--no-tags');
69676967 }
69686968 args.push('--prune', '--progress', '--no-recurse-submodules');
@@ -7040,8 +7040,8 @@ class GitCommandManager {
70407040 }
70417041 log1(format) {
70427042 return __awaiter(this, void 0, void 0, function* () {
7043- var args = format ? ['log', '-1', format] : ['log', '-1'];
7044- var silent = format ? false : true;
7043+ const args = format ? ['log', '-1', format] : ['log', '-1'];
7044+ const silent = format ? false : true;
70457045 const output = yield this.execGit(args, false, silent);
70467046 return output.stdout;
70477047 });
@@ -7394,7 +7394,7 @@ function getSource(settings) {
73947394 }
73957395 else {
73967396 const refSpec = refHelper.getRefSpec(settings.ref, settings.commit);
7397- yield git.fetch(refSpec, settings.fetchDepth);
7397+ yield git.fetch(refSpec, settings.fetchDepth, settings.fetchTags );
73987398 }
73997399 core.endGroup();
74007400 // Checkout info
@@ -17216,6 +17216,10 @@ function getInputs() {
1721617216 result.fetchDepth = 0;
1721717217 }
1721817218 core.debug(`fetch depth = ${result.fetchDepth}`);
17219+ // Fetch tags
17220+ result.fetchTags =
17221+ (core.getInput('fetch-tags') || 'false').toUpperCase() === 'TRUE';
17222+ core.debug(`fetch tags = ${result.fetchTags}`);
1721917223 // LFS
1722017224 result.lfs = (core.getInput('lfs') || 'false').toUpperCase() === 'TRUE';
1722117225 core.debug(`lfs = ${result.lfs}`);
0 commit comments