Skip to content

Commit b4664d8

Browse files
committed
remove deprecated inputs/outputs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 9cd4410 commit b4664d8

File tree

7 files changed

+4
-119
lines changed

7 files changed

+4
-119
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ jobs:
212212
env:
213213
DOCKER_CONTEXT: mycontext
214214

215-
config:
215+
buildkitd-config:
216216
runs-on: ubuntu-latest
217217
steps:
218218
-
@@ -244,7 +244,7 @@ jobs:
244244
with:
245245
context: .
246246

247-
config-inline:
247+
buildkitd-config-inline:
248248
runs-on: ubuntu-latest
249249
steps:
250250
-
@@ -391,36 +391,6 @@ jobs:
391391
with:
392392
context: .
393393

394-
standalone-install-error:
395-
runs-on: ubuntu-latest
396-
steps:
397-
-
398-
name: Checkout
399-
uses: actions/checkout@v6
400-
-
401-
name: Uninstall docker cli
402-
run: |
403-
if dpkg -s "docker-ce" >/dev/null 2>&1; then
404-
sudo dpkg -r --force-depends docker-ce-cli docker-buildx-plugin
405-
else
406-
sudo apt-get purge -y moby-cli moby-buildx
407-
fi
408-
-
409-
name: Set up Docker Buildx
410-
id: buildx
411-
continue-on-error: true
412-
uses: ./
413-
with:
414-
install: true
415-
-
416-
name: Check
417-
run: |
418-
echo "${{ toJson(steps.buildx) }}"
419-
if [ "${{ steps.buildx.outcome }}" != "failure" ] || [ "${{ steps.buildx.conclusion }}" != "success" ]; then
420-
echo "::error::Should have failed"
421-
exit 1
422-
fi
423-
424394
append:
425395
runs-on: ubuntu-latest
426396
steps:

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ The following inputs can be used as `step.with` keys:
9494
| `buildkitd-flags` | String | | [BuildKit daemon flags](https://docs.docker.com/engine/reference/commandline/buildx_create/#buildkitd-flags) |
9595
| `buildkitd-config` \* | String | | [BuildKit daemon config file](https://docs.docker.com/engine/reference/commandline/buildx_create/#config) |
9696
| `buildkitd-config-inline` \* | String | | Same as `buildkitd-config` but inline |
97-
| `install` \* | Bool | `false` | Sets up `docker build` command as an alias to `docker buildx` |
9897
| `use` | Bool | `true` | Switch to this builder instance |
9998
| `endpoint` | String | | [Optional address for docker socket](https://docs.docker.com/engine/reference/commandline/buildx_create/#description) or context from `docker context ls` |
10099
| `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 +110,6 @@ The following inputs can be used as `step.with` keys:
111110
> [!NOTE]
112111
> `buildkitd-config` and `buildkitd-config-inline` are mutually exclusive.
113112

114-
> [!NOTE]
115-
> `install` input is deprecated and will be removed in a future release. This
116-
> input is not necessary when building with our actions like
117-
> `docker/build-push-action` or `docker/bake-action`. If you are still building
118-
> with the `docker build` command then you can set the `BUILDX_BUILDER`
119-
> environment variable, or you can just directly invoke the
120-
> `docker buildx build` command: https://github.com/docker/setup-buildx-action/pull/455
121-
122113
### outputs
123114

124115
The following outputs are available:

__tests__/context.test.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ describe('getCreateArgs', () => {
5454
0,
5555
'v0.10.3',
5656
new Map<string, string>([
57-
['install', 'false'],
5857
['use', 'true'],
5958
['cache-binary', 'true'],
6059
['cleanup', 'true'],
@@ -73,7 +72,6 @@ describe('getCreateArgs', () => {
7372
'v0.10.3',
7473
new Map<string, string>([
7574
['driver', 'docker'],
76-
['install', 'false'],
7775
['use', 'true'],
7876
['cache-binary', 'true'],
7977
['cleanup', 'true'],
@@ -91,7 +89,6 @@ describe('getCreateArgs', () => {
9189
2,
9290
'v0.10.3',
9391
new Map<string, string>([
94-
['install', 'false'],
9592
['use', 'false'],
9693
['driver-opts', 'image=moby/buildkit:master\nnetwork=host'],
9794
['cache-binary', 'true'],
@@ -113,7 +110,6 @@ describe('getCreateArgs', () => {
113110
new Map<string, string>([
114111
['driver', 'remote'],
115112
['endpoint', 'tls://foo:1234'],
116-
['install', 'false'],
117113
['use', 'true'],
118114
['cache-binary', 'true'],
119115
['cleanup', 'true'],
@@ -134,7 +130,6 @@ describe('getCreateArgs', () => {
134130
['driver', 'remote'],
135131
['platforms', 'linux/arm64,linux/arm/v7'],
136132
['endpoint', 'tls://foo:1234'],
137-
['install', 'false'],
138133
['use', 'true'],
139134
['cache-binary', 'true'],
140135
['cleanup', 'true'],
@@ -153,7 +148,6 @@ describe('getCreateArgs', () => {
153148
5,
154149
'v0.10.3',
155150
new Map<string, string>([
156-
['install', 'false'],
157151
['use', 'false'],
158152
['driver-opts', `"env.no_proxy=localhost,127.0.0.1,.mydomain"`],
159153
['cache-binary', 'true'],
@@ -172,7 +166,6 @@ describe('getCreateArgs', () => {
172166
6,
173167
'v0.10.3',
174168
new Map<string, string>([
175-
['install', 'false'],
176169
['use', 'false'],
177170
['platforms', 'linux/amd64\n"linux/arm64,linux/arm/v7"'],
178171
['cache-binary', 'true'],
@@ -191,7 +184,6 @@ describe('getCreateArgs', () => {
191184
7,
192185
'v0.10.3',
193186
new Map<string, string>([
194-
['install', 'false'],
195187
['use', 'false'],
196188
['driver', 'unknown'],
197189
['cache-binary', 'true'],
@@ -208,7 +200,6 @@ describe('getCreateArgs', () => {
208200
8,
209201
'v0.10.3',
210202
new Map<string, string>([
211-
['install', 'false'],
212203
['use', 'false'],
213204
['buildkitd-config', path.join(fixturesDir, 'buildkitd.toml')],
214205
['cache-binary', 'true'],
@@ -227,7 +218,6 @@ describe('getCreateArgs', () => {
227218
9,
228219
'v0.10.3',
229220
new Map<string, string>([
230-
['install', 'false'],
231221
['use', 'false'],
232222
['buildkitd-config-inline', 'debug = true'],
233223
['cache-binary', 'true'],
@@ -246,7 +236,6 @@ describe('getCreateArgs', () => {
246236
10,
247237
'v0.10.3',
248238
new Map<string, string>([
249-
['install', 'false'],
250239
['use', 'false'],
251240
['driver', 'cloud'],
252241
['buildkitd-flags', '--allow-insecure-entitlement network.host'],
@@ -265,7 +254,6 @@ describe('getCreateArgs', () => {
265254
11,
266255
'v0.10.3',
267256
new Map<string, string>([
268-
['install', 'false'],
269257
['use', 'true'],
270258
['cleanup', 'true'],
271259
['cache-binary', 'true'],
@@ -284,7 +272,6 @@ describe('getCreateArgs', () => {
284272
12,
285273
'v0.10.3',
286274
new Map<string, string>([
287-
['install', 'false'],
288275
['use', 'true'],
289276
['cleanup', 'true'],
290277
['cache-binary', 'true'],
@@ -332,7 +319,6 @@ describe('getAppendArgs', () => {
332319
0,
333320
'v0.10.3',
334321
new Map<string, string>([
335-
['install', 'false'],
336322
['use', 'true'],
337323
['cache-binary', 'true'],
338324
['cleanup', 'true'],
@@ -391,7 +377,6 @@ describe('getVersion', () => {
391377
0,
392378
new Map<string, string>([
393379
// defaults
394-
['install', 'false'],
395380
['use', 'true'],
396381
['cache-binary', 'true'],
397382
['cleanup', 'true'],
@@ -404,7 +389,6 @@ describe('getVersion', () => {
404389
new Map<string, string>([
405390
['version', 'latest'],
406391
// defaults
407-
['install', 'false'],
408392
['use', 'true'],
409393
['cache-binary', 'true'],
410394
['cleanup', 'true'],
@@ -417,7 +401,6 @@ describe('getVersion', () => {
417401
new Map<string, string>([
418402
['version', 'edge'],
419403
// defaults
420-
['install', 'false'],
421404
['use', 'true'],
422405
['cache-binary', 'true'],
423406
['cleanup', 'true'],
@@ -430,7 +413,6 @@ describe('getVersion', () => {
430413
new Map<string, string>([
431414
['version', 'v0.19.2'],
432415
// defaults
433-
['install', 'false'],
434416
['use', 'true'],
435417
['cache-binary', 'true'],
436418
['cleanup', 'true'],
@@ -444,7 +426,6 @@ describe('getVersion', () => {
444426
['version', 'latest'],
445427
['driver', 'cloud'],
446428
// defaults
447-
['install', 'false'],
448429
['use', 'true'],
449430
['cache-binary', 'true'],
450431
['cleanup', 'true'],
@@ -458,7 +439,6 @@ describe('getVersion', () => {
458439
['version', 'edge'],
459440
['driver', 'cloud'],
460441
// defaults
461-
['install', 'false'],
462442
['use', 'true'],
463443
['cache-binary', 'true'],
464444
['cleanup', 'true'],
@@ -471,7 +451,6 @@ describe('getVersion', () => {
471451
new Map<string, string>([
472452
['driver', 'cloud'],
473453
// defaults
474-
['install', 'false'],
475454
['use', 'true'],
476455
['cache-binary', 'true'],
477456
['cleanup', 'true'],
@@ -485,7 +464,6 @@ describe('getVersion', () => {
485464
['version', 'cloud:v0.11.2-desktop.2'],
486465
['driver', 'cloud'],
487466
// defaults
488-
['install', 'false'],
489467
['use', 'true'],
490468
['cache-binary', 'true'],
491469
['cleanup', 'true'],
@@ -498,7 +476,6 @@ describe('getVersion', () => {
498476
new Map<string, string>([
499477
['version', 'cloud:v0.11.2-desktop.2'],
500478
// defaults
501-
['install', 'false'],
502479
['use', 'true'],
503480
['cache-binary', 'true'],
504481
['cleanup', 'true'],

action.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@ inputs:
5454
description: 'Cleanup temp files and remove builder at the end of a job'
5555
default: 'true'
5656
required: false
57-
# TODO: remove deprecated config, config-inline and install inputs
58-
config:
59-
description: 'BuildKit daemon config file'
60-
deprecationMessage: 'Use buildkitd-config instead'
61-
required: false
62-
config-inline:
63-
description: 'Inline BuildKit daemon config'
64-
deprecationMessage: 'Use buildkitd-config-inline instead'
65-
required: false
66-
install:
67-
description: 'Sets up docker build command as an alias to docker buildx build'
68-
deprecationMessage: '"docker buildx install" command is deprecated and will be removed in a future release, use BUILDX_BUILDER environment variable instead'
69-
default: 'false'
70-
required: false
7157

7258
outputs:
7359
name:

src/context.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export interface Inputs {
1919
buildkitdConfig: string;
2020
buildkitdConfigInline: string;
2121
platforms: string[];
22-
install: boolean;
2322
use: boolean;
2423
endpoint: string;
2524
append: string;
@@ -36,11 +35,10 @@ export async function getInputs(): Promise<Inputs> {
3635
driverOpts: Util.getInputList('driver-opts', {ignoreComma: true, quote: false}),
3736
buildkitdFlags: core.getInput('buildkitd-flags'),
3837
platforms: Util.getInputList('platforms'),
39-
install: core.getBooleanInput('install'),
4038
use: core.getBooleanInput('use'),
4139
endpoint: core.getInput('endpoint'),
42-
buildkitdConfig: core.getInput('buildkitd-config') || core.getInput('config'),
43-
buildkitdConfigInline: core.getInput('buildkitd-config-inline') || core.getInput('config-inline'),
40+
buildkitdConfig: core.getInput('buildkitd-config'),
41+
buildkitdConfigInline: core.getInput('buildkitd-config-inline'),
4442
append: core.getInput('append'),
4543
keepState: core.getBooleanInput('keep-state'),
4644
cacheBinary: core.getBooleanInput('cache-binary'),

src/main.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -187,23 +187,6 @@ actionsToolkit.run(
187187
});
188188
});
189189

190-
if (inputs.install) {
191-
if (standalone) {
192-
throw new Error(`Cannot set buildx as default builder without the Docker CLI`);
193-
}
194-
await core.group(`Setting buildx as default builder`, async () => {
195-
stateHelper.setBuildxIsDefaultBuilder(true);
196-
const installCmd = await toolkit.buildx.getCommand(['install']);
197-
await Exec.getExecOutput(installCmd.command, installCmd.args, {
198-
ignoreReturnCode: true
199-
}).then(res => {
200-
if (res.stderr.length > 0 && res.exitCode != 0) {
201-
throw new Error(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error');
202-
}
203-
});
204-
});
205-
}
206-
207190
const builderInspect = await toolkit.builder.inspect(inputs.name);
208191
const firstNode = builderInspect.nodes[0];
209192

@@ -221,9 +204,6 @@ actionsToolkit.run(
221204
core.setOutput('driver', builderInspect.driver);
222205
core.setOutput('platforms', reducedPlatforms.join(','));
223206
core.setOutput('nodes', JSON.stringify(builderInspect.nodes, undefined, 2));
224-
core.setOutput('endpoint', firstNode.endpoint); // TODO: deprecated, to be removed in a later version
225-
core.setOutput('status', firstNode.status); // TODO: deprecated, to be removed in a later version
226-
core.setOutput('flags', firstNode['buildkitd-flags']); // TODO: deprecated, to be removed in a later version
227207
});
228208

229209
if (!standalone && builderInspect.driver == 'docker-container') {
@@ -293,17 +273,5 @@ actionsToolkit.run(
293273
fs.rmSync(stateHelper.certsDir, {recursive: true});
294274
});
295275
}
296-
297-
if (stateHelper.buildxIsDefaultBuilder) {
298-
await core.group(`Restoring default builder`, async () => {
299-
await Exec.getExecOutput('docker', ['buildx', 'uninstall'], {
300-
ignoreReturnCode: true
301-
}).then(res => {
302-
if (res.stderr.length > 0 && res.exitCode != 0) {
303-
core.warning(`${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
304-
}
305-
});
306-
});
307-
}
308276
}
309277
);

src/state-helper.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export const containerName = process.env['STATE_containerName'] || '';
88
export const certsDir = process.env['STATE_certsDir'] || '';
99
export const tmpDockerContext = process.env['STATE_tmpDockerContext'] || '';
1010
export const cleanup = /true/i.test(process.env['STATE_cleanup'] || '');
11-
export const buildxIsDefaultBuilder = /true/i.test(process.env['STATE_buildxIsDefaultBuilder'] || '');
1211
export const keepState = /true/i.test(process.env['STATE_keepState'] || '');
1312

1413
export function setDebug(debug: string) {
@@ -43,10 +42,6 @@ export function setCleanup(cleanup: boolean) {
4342
core.saveState('cleanup', cleanup);
4443
}
4544

46-
export function setBuildxIsDefaultBuilder(buildxIsDefaultBuilder: boolean) {
47-
core.saveState('buildxIsDefaultBuilder', buildxIsDefaultBuilder);
48-
}
49-
5045
export function setKeepState(keepState: boolean) {
5146
core.saveState('keepState', keepState);
5247
}

0 commit comments

Comments
 (0)