|
158 | 158 | COSIGN_VERSION: "v3.0.2" |
159 | 159 | LOCAL_EXPORT_DIR: "/tmp/buildx-output" |
160 | 160 | MATRIX_SIZE_LIMIT: "20" |
| 161 | + BUILDX_SEND_GIT_QUERY_AS_INPUT: "true" |
161 | 162 |
|
162 | 163 | jobs: |
163 | 164 | prepare: |
@@ -226,6 +227,14 @@ jobs: |
226 | 227 | } |
227 | 228 | }); |
228 | 229 | } |
| 230 | + - |
| 231 | + name: Set up Docker Buildx |
| 232 | + uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 |
| 233 | + with: |
| 234 | + version: ${{ env.BUILDX_VERSION }} |
| 235 | + cache-binary: false |
| 236 | + driver-opts: | |
| 237 | + image=${{ env.BUILDKIT_IMAGE }} |
229 | 238 | - |
230 | 239 | name: Expose GitHub Runtime |
231 | 240 | uses: crazy-max/ghaction-github-runtime@04d248b84655b509d8c44dc1d6f990c879747487 # v4.0.0 |
@@ -254,6 +263,7 @@ jobs: |
254 | 263 | script: | |
255 | 264 | const os = require('os'); |
256 | 265 | const { Bake } = require('@docker/actions-toolkit/lib/buildx/bake'); |
| 266 | + const { Build } = require('@docker/actions-toolkit/lib/buildx/build'); |
257 | 267 | const { GitHub } = require('@docker/actions-toolkit/lib/github/github'); |
258 | 268 | const { Util } = require('@docker/actions-toolkit/lib/util'); |
259 | 269 |
|
@@ -300,7 +310,7 @@ jobs: |
300 | 310 | return; |
301 | 311 | } |
302 | 312 |
|
303 | | - const bakeSource = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git#${process.env.GITHUB_REF}:${inpContext}`; |
| 313 | + const bakeSource = await new Build().gitContext({subdir: inpContext}); |
304 | 314 | await core.group(`Set bake source`, async () => { |
305 | 315 | core.info(bakeSource); |
306 | 316 | }); |
@@ -668,7 +678,7 @@ jobs: |
668 | 678 | }; |
669 | 679 | const renderTemplate = value => Handlebars.compile(value, {noEscape: true})({meta}); |
670 | 680 | |
671 | | - const bakeSource = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git#${process.env.GITHUB_REF}:${inpContext}`; |
| 681 | + const bakeSource = await new Build().gitContext({subdir: inpContext}); |
672 | 682 | await core.group(`Set source output`, async () => { |
673 | 683 | core.info(bakeSource); |
674 | 684 | core.setOutput('source', bakeSource); |
|
0 commit comments