File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -413,8 +413,9 @@ jobs:
413413 core.setFailed(`signing attestation manifests requires push to be enabled`);
414414 return;
415415 }
416-
417- const bakeSource = await new Build().gitContext({subdir: inpContext});
416+
417+ const gitContextAttrs = GitHub.context.ref.startsWith('refs/tags/') ? {} : {'fetch-by-commit': 'true'};
418+ const bakeSource = await new Build().gitContext({subdir: inpContext, attrs: gitContextAttrs});
418419 await core.group(`Set bake source`, async () => {
419420 core.info(bakeSource);
420421 });
@@ -810,7 +811,8 @@ jobs:
810811 };
811812 const renderTemplate = value => Util.compileHandlebars(value, {noEscape: true}, {meta});
812813
813- const bakeSource = await new Build().gitContext({subdir: inpContext});
814+ const gitContextAttrs = GitHub.context.ref.startsWith('refs/tags/') ? {} : {'fetch-by-commit': 'true'};
815+ const bakeSource = await new Build().gitContext({subdir: inpContext, attrs: gitContextAttrs});
814816 await core.group(`Set source output`, async () => {
815817 core.info(bakeSource);
816818 core.setOutput('source', bakeSource);
Original file line number Diff line number Diff line change @@ -703,8 +703,9 @@ jobs:
703703
704704 const renderTemplate = value => Util.compileHandlebars(value, {noEscape: true}, {meta});
705705 const toMultilineInput = value => value.split(/\r?\n/).map(line => line.trim()).filter(Boolean);
706-
707- const buildContext = await new Build().gitContext({subdir: inpContext});
706+
707+ const gitContextAttrs = GitHub.context.ref.startsWith('refs/tags/') ? {} : {'fetch-by-commit': 'true'};
708+ const buildContext = await new Build().gitContext({subdir: inpContext, attrs: gitContextAttrs});
708709 core.setOutput('context', buildContext);
709710
710711 switch (inpOutput) {
You can’t perform that action at this time.
0 commit comments