File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 158158 COSIGN_VERSION : " v3.0.2"
159159 LOCAL_EXPORT_DIR : " /tmp/buildx-output"
160160 MATRIX_SIZE_LIMIT : " 20"
161+ BUILDX_SEND_GIT_QUERY_AS_INPUT : " true"
161162
162163jobs :
163164 prepare :
@@ -254,6 +255,7 @@ jobs:
254255 script : |
255256 const os = require('os');
256257 const { Bake } = require('@docker/actions-toolkit/lib/buildx/bake');
258+ const { Build } = require('@docker/actions-toolkit/lib/buildx/build');
257259 const { GitHub } = require('@docker/actions-toolkit/lib/github/github');
258260 const { Util } = require('@docker/actions-toolkit/lib/util');
259261
@@ -300,7 +302,7 @@ jobs:
300302 return;
301303 }
302304
303- const bakeSource = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git#${process.env.GITHUB_REF}:${ inpContext}` ;
305+ const bakeSource = await new Build().gitContext({subdir: inpContext}) ;
304306 await core.group(`Set bake source`, async () => {
305307 core.info(bakeSource);
306308 });
@@ -668,7 +670,7 @@ jobs:
668670 };
669671 const renderTemplate = value => Handlebars.compile(value, {noEscape: true})({meta});
670672
671- const bakeSource = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git#${process.env.GITHUB_REF}:${ inpContext}` ;
673+ const bakeSource = await new Build().gitContext({subdir: inpContext}) ;
672674 await core.group(`Set source output`, async () => {
673675 core.info(bakeSource);
674676 core.setOutput('source', bakeSource);
Original file line number Diff line number Diff line change 161161 COSIGN_VERSION : " v3.0.2"
162162 LOCAL_EXPORT_DIR : " /tmp/buildx-output"
163163 MATRIX_SIZE_LIMIT : " 20"
164+ BUILDX_SEND_GIT_QUERY_AS_INPUT : " true"
164165
165166jobs :
166167 prepare :
@@ -570,7 +571,7 @@ jobs:
570571 const renderTemplate = value => Handlebars.compile(value, {noEscape: true})({meta});
571572 const toMultilineInput = value => value.split(/\r?\n/).map(line => line.trim()).filter(Boolean);
572573
573- const buildContext = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git#${process.env.GITHUB_REF}:${ inpContext}` ;
574+ const buildContext = await new Build().gitContext({subdir: inpContext}) ;
574575 core.setOutput('context', buildContext);
575576
576577 switch (inpOutput) {
You can’t perform that action at this time.
0 commit comments