Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/bake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,12 @@ env:
BUILDKIT_IMAGE: "moby/buildkit:v0.28.0"
SBOM_IMAGE: "docker/buildkit-syft-scanner:1.10.0"
BINFMT_IMAGE: "tonistiigi/binfmt:qemu-v10.2.1-65"
DOCKER_ACTIONS_TOOLKIT_MODULE: "@docker/actions-toolkit@0.83.0"
DOCKER_ACTIONS_TOOLKIT_MODULE: "@docker/actions-toolkit@0.84.1"
HANDLEBARS_MODULE: "handlebars@4.7.8"
COSIGN_VERSION: "v3.0.2"
LOCAL_EXPORT_DIR: "/tmp/buildx-output"
MATRIX_SIZE_LIMIT: "20"
BUILDX_SEND_GIT_QUERY_AS_INPUT: "true"

jobs:
prepare:
Expand Down Expand Up @@ -226,6 +227,14 @@ jobs:
}
});
}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
with:
version: ${{ env.BUILDX_VERSION }}
cache-binary: false
driver-opts: |
image=${{ env.BUILDKIT_IMAGE }}
-
name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@04d248b84655b509d8c44dc1d6f990c879747487 # v4.0.0
Expand Down Expand Up @@ -254,6 +263,7 @@ jobs:
script: |
const os = require('os');
const { Bake } = require('@docker/actions-toolkit/lib/buildx/bake');
const { Build } = require('@docker/actions-toolkit/lib/buildx/build');
const { GitHub } = require('@docker/actions-toolkit/lib/github/github');
const { Util } = require('@docker/actions-toolkit/lib/util');

Expand Down Expand Up @@ -300,7 +310,7 @@ jobs:
return;
}

const bakeSource = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git#${process.env.GITHUB_REF}:${inpContext}`;
const bakeSource = await new Build().gitContext({subdir: inpContext});
await core.group(`Set bake source`, async () => {
core.info(bakeSource);
});
Expand Down Expand Up @@ -668,7 +678,7 @@ jobs:
};
const renderTemplate = value => Handlebars.compile(value, {noEscape: true})({meta});

const bakeSource = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git#${process.env.GITHUB_REF}:${inpContext}`;
const bakeSource = await new Build().gitContext({subdir: inpContext});
await core.group(`Set source output`, async () => {
core.info(bakeSource);
core.setOutput('source', bakeSource);
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,12 @@ env:
BUILDKIT_IMAGE: "moby/buildkit:v0.28.0"
SBOM_IMAGE: "docker/buildkit-syft-scanner:1.10.0"
BINFMT_IMAGE: "tonistiigi/binfmt:qemu-v10.2.1-65"
DOCKER_ACTIONS_TOOLKIT_MODULE: "@docker/actions-toolkit@0.83.0"
DOCKER_ACTIONS_TOOLKIT_MODULE: "@docker/actions-toolkit@0.84.1"
HANDLEBARS_MODULE: "handlebars@4.7.8"
COSIGN_VERSION: "v3.0.2"
LOCAL_EXPORT_DIR: "/tmp/buildx-output"
MATRIX_SIZE_LIMIT: "20"
BUILDX_SEND_GIT_QUERY_AS_INPUT: "true"

jobs:
prepare:
Expand Down Expand Up @@ -570,7 +571,7 @@ jobs:
const renderTemplate = value => Handlebars.compile(value, {noEscape: true})({meta});
const toMultilineInput = value => value.split(/\r?\n/).map(line => line.trim()).filter(Boolean);

const buildContext = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git#${process.env.GITHUB_REF}:${inpContext}`;
const buildContext = await new Build().gitContext({subdir: inpContext});
core.setOutput('context', buildContext);

switch (inpOutput) {
Expand Down
Loading