diff --git a/.github/workflows/bake.yml b/.github/workflows/bake.yml index 0c59d5a..5dc94a9 100644 --- a/.github/workflows/bake.yml +++ b/.github/workflows/bake.yml @@ -435,7 +435,7 @@ jobs: return; } - const gitContextAttrs = GitHub.context.ref.startsWith('refs/tags/') ? {} : {'fetch-by-commit': 'true'}; + const gitContextAttrs = GitHub.context.ref.startsWith('refs/tags/') ? {checksum: GitHub.context.sha} : {'fetch-by-commit': 'true'}; const bakeSource = await new Build().gitContext({subdir: inpContext, attrs: gitContextAttrs}); await core.group(`Set bake source`, async () => { core.info(bakeSource); @@ -855,7 +855,7 @@ jobs: }; const renderTemplate = value => Util.compileHandlebars(value, {noEscape: true}, {meta}); - const gitContextAttrs = GitHub.context.ref.startsWith('refs/tags/') ? {} : {'fetch-by-commit': 'true'}; + const gitContextAttrs = GitHub.context.ref.startsWith('refs/tags/') ? {checksum: GitHub.context.sha} : {'fetch-by-commit': 'true'}; const bakeSource = await new Build().gitContext({subdir: inpContext, attrs: gitContextAttrs}); await core.group(`Set source output`, async () => { core.info(bakeSource); diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a13697..485d63d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -748,7 +748,7 @@ jobs: const renderTemplate = value => Util.compileHandlebars(value, {noEscape: true}, {meta}); const toMultilineInput = value => value.split(/\r?\n/).map(line => line.trim()).filter(Boolean); - const gitContextAttrs = GitHub.context.ref.startsWith('refs/tags/') ? {} : {'fetch-by-commit': 'true'}; + const gitContextAttrs = GitHub.context.ref.startsWith('refs/tags/') ? {checksum: GitHub.context.sha} : {'fetch-by-commit': 'true'}; const buildContext = await new Build().gitContext({subdir: inpContext, attrs: gitContextAttrs}); core.setOutput('context', buildContext);