Compare commits

...

10 Commits

Author SHA1 Message Date
CrazyMax
2ae358d897
Merge pull request #486 from crazy-max/update-readme
Some checks are pending
ci / docker-driver (push) Waiting to run
ci / endpoint (push) Waiting to run
ci / buildkitd-config (push) Waiting to run
ci / buildkitd-config-inline (push) Waiting to run
ci / with-qemu (, all) (push) Waiting to run
ci / with-qemu (, arm64,riscv64,arm) (push) Waiting to run
ci / with-qemu (v0.9.1, all) (push) Waiting to run
ci / with-qemu (v0.9.1, arm64,riscv64,arm) (push) Waiting to run
ci / build-ref (cb185f095fd3d9444e0aa605d3789e9e05f2a1e7) (push) Waiting to run
ci / build-ref (master) (push) Waiting to run
ci / build-ref (refs/pull/731/head) (push) Waiting to run
ci / build-ref (refs/tags/v0.5.1) (push) Waiting to run
ci / standalone-cmd (push) Waiting to run
ci / standalone-action (push) Waiting to run
ci / append (push) Waiting to run
ci / platforms (push) Waiting to run
ci / docker-context (push) Waiting to run
ci / cleanup (false) (push) Waiting to run
ci / cleanup (true) (push) Waiting to run
ci / k3s (latest) (push) Waiting to run
ci / k3s (v0.10.5) (push) Waiting to run
ci / k3s (v0.11.0) (push) Waiting to run
ci / cache-binary (false) (push) Waiting to run
ci / cache-binary (true) (push) Waiting to run
ci / windows-error (push) Waiting to run
ci / keep-state (push) Waiting to run
ci / keep-state-error (push) Waiting to run
test / test (push) Waiting to run
validate / prepare (push) Waiting to run
validate / validate (push) Blocked by required conditions
readme: update to v4
2026-03-05 09:17:23 +01:00
CrazyMax
d586dba768
readme: update to v4
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 09:09:21 +01:00
CrazyMax
4d04d5d948
Merge pull request #485 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.79.0
build(deps): bump @docker/actions-toolkit from 0.77.0 to 0.79.0
2026-03-05 08:41:24 +01:00
github-actions[bot]
cd74e05d9b chore: update generated content 2026-03-05 07:38:34 +00:00
dependabot[bot]
eee38ec7b3
build(deps): bump @docker/actions-toolkit from 0.77.0 to 0.79.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.77.0 to 0.79.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.77.0...v0.79.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.79.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 07:37:31 +00:00
CrazyMax
7a83f65b5a
Merge pull request #484 from docker/dependabot/github_actions/docker/setup-qemu-action-4
build(deps): bump docker/setup-qemu-action from 3 to 4
2026-03-05 08:35:10 +01:00
CrazyMax
a5aa96747d
Merge pull request #464 from crazy-max/rm-deprecated
remove deprecated inputs/outputs
2026-03-05 08:34:48 +01:00
dependabot[bot]
e73d53fa4e
build(deps): bump docker/setup-qemu-action from 3 to 4
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 04:42:14 +00:00
CrazyMax
034e9d37dd
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-04 10:00:32 +01:00
CrazyMax
b4664d8fd0
remove deprecated inputs/outputs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-04 09:07:39 +01:00
11 changed files with 32 additions and 152 deletions

View File

@ -102,7 +102,7 @@ jobs:
EOL
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
-
name: Set up Docker Buildx
uses: ./
@ -212,7 +212,7 @@ jobs:
env:
DOCKER_CONTEXT: mycontext
config:
buildkitd-config:
runs-on: ubuntu-latest
steps:
-
@ -244,7 +244,7 @@ jobs:
with:
context: .
config-inline:
buildkitd-config-inline:
runs-on: ubuntu-latest
steps:
-
@ -288,7 +288,7 @@ jobs:
uses: actions/checkout@v6
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
with:
platforms: ${{ matrix.qemu-platforms }}
-
@ -391,36 +391,6 @@ jobs:
with:
context: .
standalone-install-error:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Uninstall docker cli
run: |
if dpkg -s "docker-ce" >/dev/null 2>&1; then
sudo dpkg -r --force-depends docker-ce-cli docker-buildx-plugin
else
sudo apt-get purge -y moby-cli moby-buildx
fi
-
name: Set up Docker Buildx
id: buildx
continue-on-error: true
uses: ./
with:
install: true
-
name: Check
run: |
echo "${{ toJson(steps.buildx) }}"
if [ "${{ steps.buildx.outcome }}" != "failure" ] || [ "${{ steps.buildx.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
fi
append:
runs-on: ubuntu-latest
steps:
@ -458,7 +428,7 @@ jobs:
uses: actions/checkout@v6
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
-
name: Set up Docker Buildx
uses: ./

View File

@ -40,17 +40,14 @@ jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v5
-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
```
## Configuring your builder
@ -94,7 +91,6 @@ The following inputs can be used as `step.with` keys:
| `buildkitd-flags` | String | | [BuildKit daemon flags](https://docs.docker.com/engine/reference/commandline/buildx_create/#buildkitd-flags) |
| `buildkitd-config` \* | String | | [BuildKit daemon config file](https://docs.docker.com/engine/reference/commandline/buildx_create/#config) |
| `buildkitd-config-inline` \* | String | | Same as `buildkitd-config` but inline |
| `install` \* | Bool | `false` | Sets up `docker build` command as an alias to `docker buildx` |
| `use` | Bool | `true` | Switch to this builder instance |
| `endpoint` | String | | [Optional address for docker socket](https://docs.docker.com/engine/reference/commandline/buildx_create/#description) or context from `docker context ls` |
| `platforms` | List/CSV | | Fixed [platforms](https://docs.docker.com/engine/reference/commandline/buildx_create/#platform) for current node. If not empty, values take priority over the detected ones |
@ -111,14 +107,6 @@ The following inputs can be used as `step.with` keys:
> [!NOTE]
> `buildkitd-config` and `buildkitd-config-inline` are mutually exclusive.
> [!NOTE]
> `install` input is deprecated and will be removed in a future release. This
> input is not necessary when building with our actions like
> `docker/build-push-action` or `docker/bake-action`. If you are still building
> with the `docker build` command then you can set the `BUILDX_BUILDER`
> environment variable, or you can just directly invoke the
> `docker buildx build` command: https://github.com/docker/setup-buildx-action/pull/455
### outputs
The following outputs are available:
@ -142,23 +130,6 @@ The following [official docker environment variables](https://docs.docker.com/en
### `nodes` output
```json
[
{
"name": "builder-3820d274-502c-4498-ae24-d4c32b3023d90",
"endpoint": "unix:///var/run/docker.sock",
"driver-opts": [
"network=host",
"image=moby/buildkit:master"
],
"status": "running",
"buildkitd-flags": "--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host",
"buildkit": "3fab389",
"platforms": "linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/386"
}
]
```
| Name | Type | Description |
|-------------------|--------|----------------------------|
| `name` | String | Node name |
@ -169,6 +140,21 @@ The following [official docker environment variables](https://docs.docker.com/en
| `buildkit` | String | BuildKit version |
| `platforms` | String | Platforms available |
Example:
```json
[
{
"name": "builder-8fa135e1-9bce-4a29-9368-46a09a1d750d0",
"endpoint": "unix:///var/run/docker.sock",
"status": "running",
"buildkitd-flags": "--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host",
"buildkit": "v0.27.1",
"platforms": "linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/386"
}
]
```
## Contributing
Want to contribute? Awesome! You can find information about contributing to

View File

@ -54,7 +54,6 @@ describe('getCreateArgs', () => {
0,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -73,7 +72,6 @@ describe('getCreateArgs', () => {
'v0.10.3',
new Map<string, string>([
['driver', 'docker'],
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -91,7 +89,6 @@ describe('getCreateArgs', () => {
2,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'false'],
['driver-opts', 'image=moby/buildkit:master\nnetwork=host'],
['cache-binary', 'true'],
@ -113,7 +110,6 @@ describe('getCreateArgs', () => {
new Map<string, string>([
['driver', 'remote'],
['endpoint', 'tls://foo:1234'],
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -134,7 +130,6 @@ describe('getCreateArgs', () => {
['driver', 'remote'],
['platforms', 'linux/arm64,linux/arm/v7'],
['endpoint', 'tls://foo:1234'],
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -153,7 +148,6 @@ describe('getCreateArgs', () => {
5,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'false'],
['driver-opts', `"env.no_proxy=localhost,127.0.0.1,.mydomain"`],
['cache-binary', 'true'],
@ -172,7 +166,6 @@ describe('getCreateArgs', () => {
6,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'false'],
['platforms', 'linux/amd64\n"linux/arm64,linux/arm/v7"'],
['cache-binary', 'true'],
@ -191,7 +184,6 @@ describe('getCreateArgs', () => {
7,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'false'],
['driver', 'unknown'],
['cache-binary', 'true'],
@ -208,7 +200,6 @@ describe('getCreateArgs', () => {
8,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'false'],
['buildkitd-config', path.join(fixturesDir, 'buildkitd.toml')],
['cache-binary', 'true'],
@ -227,7 +218,6 @@ describe('getCreateArgs', () => {
9,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'false'],
['buildkitd-config-inline', 'debug = true'],
['cache-binary', 'true'],
@ -246,7 +236,6 @@ describe('getCreateArgs', () => {
10,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'false'],
['driver', 'cloud'],
['buildkitd-flags', '--allow-insecure-entitlement network.host'],
@ -265,7 +254,6 @@ describe('getCreateArgs', () => {
11,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'true'],
['cleanup', 'true'],
['cache-binary', 'true'],
@ -284,7 +272,6 @@ describe('getCreateArgs', () => {
12,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'true'],
['cleanup', 'true'],
['cache-binary', 'true'],
@ -332,7 +319,6 @@ describe('getAppendArgs', () => {
0,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -391,7 +377,6 @@ describe('getVersion', () => {
0,
new Map<string, string>([
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -404,7 +389,6 @@ describe('getVersion', () => {
new Map<string, string>([
['version', 'latest'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -417,7 +401,6 @@ describe('getVersion', () => {
new Map<string, string>([
['version', 'edge'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -430,7 +413,6 @@ describe('getVersion', () => {
new Map<string, string>([
['version', 'v0.19.2'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -444,7 +426,6 @@ describe('getVersion', () => {
['version', 'latest'],
['driver', 'cloud'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -458,7 +439,6 @@ describe('getVersion', () => {
['version', 'edge'],
['driver', 'cloud'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -471,7 +451,6 @@ describe('getVersion', () => {
new Map<string, string>([
['driver', 'cloud'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -485,7 +464,6 @@ describe('getVersion', () => {
['version', 'cloud:v0.11.2-desktop.2'],
['driver', 'cloud'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
@ -498,7 +476,6 @@ describe('getVersion', () => {
new Map<string, string>([
['version', 'cloud:v0.11.2-desktop.2'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],

View File

@ -54,20 +54,6 @@ inputs:
description: 'Cleanup temp files and remove builder at the end of a job'
default: 'true'
required: false
# TODO: remove deprecated config, config-inline and install inputs
config:
description: 'BuildKit daemon config file'
deprecationMessage: 'Use buildkitd-config instead'
required: false
config-inline:
description: 'Inline BuildKit daemon config'
deprecationMessage: 'Use buildkitd-config-inline instead'
required: false
install:
description: 'Sets up docker build command as an alias to docker buildx build'
deprecationMessage: '"docker buildx install" command is deprecated and will be removed in a future release, use BUILDX_BUILDER environment variable instead'
default: 'false'
required: false
outputs:
name:

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,7 @@
"packageManager": "yarn@4.9.2",
"dependencies": {
"@actions/core": "^3.0.0",
"@docker/actions-toolkit": "^0.77.0",
"@docker/actions-toolkit": "^0.79.0",
"js-yaml": "^4.1.1"
},
"devDependencies": {

View File

@ -19,7 +19,6 @@ export interface Inputs {
buildkitdConfig: string;
buildkitdConfigInline: string;
platforms: string[];
install: boolean;
use: boolean;
endpoint: string;
append: string;
@ -36,11 +35,10 @@ export async function getInputs(): Promise<Inputs> {
driverOpts: Util.getInputList('driver-opts', {ignoreComma: true, quote: false}),
buildkitdFlags: core.getInput('buildkitd-flags'),
platforms: Util.getInputList('platforms'),
install: core.getBooleanInput('install'),
use: core.getBooleanInput('use'),
endpoint: core.getInput('endpoint'),
buildkitdConfig: core.getInput('buildkitd-config') || core.getInput('config'),
buildkitdConfigInline: core.getInput('buildkitd-config-inline') || core.getInput('config-inline'),
buildkitdConfig: core.getInput('buildkitd-config'),
buildkitdConfigInline: core.getInput('buildkitd-config-inline'),
append: core.getInput('append'),
keepState: core.getBooleanInput('keep-state'),
cacheBinary: core.getBooleanInput('cache-binary'),

View File

@ -187,23 +187,6 @@ actionsToolkit.run(
});
});
if (inputs.install) {
if (standalone) {
throw new Error(`Cannot set buildx as default builder without the Docker CLI`);
}
await core.group(`Setting buildx as default builder`, async () => {
stateHelper.setBuildxIsDefaultBuilder(true);
const installCmd = await toolkit.buildx.getCommand(['install']);
await Exec.getExecOutput(installCmd.command, installCmd.args, {
ignoreReturnCode: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error');
}
});
});
}
const builderInspect = await toolkit.builder.inspect(inputs.name);
const firstNode = builderInspect.nodes[0];
@ -221,9 +204,6 @@ actionsToolkit.run(
core.setOutput('driver', builderInspect.driver);
core.setOutput('platforms', reducedPlatforms.join(','));
core.setOutput('nodes', JSON.stringify(builderInspect.nodes, undefined, 2));
core.setOutput('endpoint', firstNode.endpoint); // TODO: deprecated, to be removed in a later version
core.setOutput('status', firstNode.status); // TODO: deprecated, to be removed in a later version
core.setOutput('flags', firstNode['buildkitd-flags']); // TODO: deprecated, to be removed in a later version
});
if (!standalone && builderInspect.driver == 'docker-container') {
@ -293,17 +273,5 @@ actionsToolkit.run(
fs.rmSync(stateHelper.certsDir, {recursive: true});
});
}
if (stateHelper.buildxIsDefaultBuilder) {
await core.group(`Restoring default builder`, async () => {
await Exec.getExecOutput('docker', ['buildx', 'uninstall'], {
ignoreReturnCode: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
core.warning(`${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
}
});
});
}
}
);

View File

@ -8,7 +8,6 @@ export const containerName = process.env['STATE_containerName'] || '';
export const certsDir = process.env['STATE_certsDir'] || '';
export const tmpDockerContext = process.env['STATE_tmpDockerContext'] || '';
export const cleanup = /true/i.test(process.env['STATE_cleanup'] || '');
export const buildxIsDefaultBuilder = /true/i.test(process.env['STATE_buildxIsDefaultBuilder'] || '');
export const keepState = /true/i.test(process.env['STATE_keepState'] || '');
export function setDebug(debug: string) {
@ -43,10 +42,6 @@ export function setCleanup(cleanup: boolean) {
core.saveState('cleanup', cleanup);
}
export function setBuildxIsDefaultBuilder(buildxIsDefaultBuilder: boolean) {
core.saveState('buildxIsDefaultBuilder', buildxIsDefaultBuilder);
}
export function setKeepState(keepState: boolean) {
core.saveState('keepState', keepState);
}

View File

@ -367,9 +367,9 @@ __metadata:
languageName: node
linkType: hard
"@docker/actions-toolkit@npm:^0.77.0":
version: 0.77.0
resolution: "@docker/actions-toolkit@npm:0.77.0"
"@docker/actions-toolkit@npm:^0.79.0":
version: 0.79.0
resolution: "@docker/actions-toolkit@npm:0.79.0"
dependencies:
"@actions/artifact": "npm:^6.2.0"
"@actions/cache": "npm:^6.0.0"
@ -393,7 +393,7 @@ __metadata:
semver: "npm:^7.7.4"
tar-stream: "npm:^3.1.7"
tmp: "npm:^0.2.5"
checksum: 10/f3ae817a5a6827efc63d1a1730e918801a8fa33867cda72bd7a1f78309631c45d91de60bc57985c7520fae168e96daed0fcab0003b5fab9b50bdd7aa355d651b
checksum: 10/d64849ba49b2b59e2e93237a70be03fd7c43b1f7f01bac3f7557616ba5f59be785cb12a273bbb6a71c1e0d959f1bc6c673111b587c57bd2d6da105dcc500921a
languageName: node
linkType: hard
@ -2089,7 +2089,7 @@ __metadata:
resolution: "docker-setup-buildx@workspace:."
dependencies:
"@actions/core": "npm:^3.0.0"
"@docker/actions-toolkit": "npm:^0.77.0"
"@docker/actions-toolkit": "npm:^0.79.0"
"@eslint/js": "npm:^9.39.3"
"@types/js-yaml": "npm:^4.0.9"
"@types/node": "npm:^24.11.0"