@@ -5,6 +5,10 @@ import * as core from '@actions/core';
5
5
import * as actionsToolkit from '@docker/actions-toolkit';
6
6
import {Install} from '@docker/actions-toolkit/lib/docker/install';
7
7
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
8
+ import {Install as RegclientInstall} from '@docker/actions-toolkit/lib/regclient/install';
9
+ import {Regctl} from '@docker/actions-toolkit/lib/regclient/regctl';
10
+ import {Install as UndockInstall} from '@docker/actions-toolkit/lib/undock/install';
11
+ import {Undock} from '@docker/actions-toolkit/lib/undock/undock';
8
12
9
13
import * as context from './context';
10
14
import * as stateHelper from './state-helper';
@@ -19,6 +23,22 @@ actionsToolkit.run(
19
23
throw new Error(`'default' context cannot be used.`);
20
24
}
21
25
26
+ await core.group(`Download and install regctl`, async () => {
27
+ const regclientInstall = new RegclientInstall();
28
+ const regclientBinPath = await regclientInstall.download(
29
+ process.env.REGCTL_VERSION && process.env.REGCTL_VERSION.trim() ? process.env.REGCTL_VERSION : 'v0.8.3'
30
+ );
31
+ await regclientInstall.install(regclientBinPath);
32
+ });
33
+
34
+ await core.group(`Download and install undock`, async () => {
35
+ const undockInstall = new UndockInstall();
36
+ const undockBinPath = await undockInstall.download(
37
+ process.env.UNDOCK_VERSION && process.env.UNDOCK_VERSION.trim() ? process.env.UNDOCK_VERSION : 'v0.10.0'
38
+ );
39
+ await undockInstall.install(undockBinPath);
40
+ });
41
+
22
42
let tcpPort: number | undefined;
23
43
let tcpAddress: string | undefined;
24
44
if (input.tcpPort) {
@@ -32,7 +52,9 @@ actionsToolkit.run(
32
52
rootless: input.rootless,
33
53
contextName: input.context || 'setup-docker-action',
34
54
daemonConfig: input.daemonConfig,
35
- localTCPPort: tcpPort
55
+ localTCPPort: tcpPort,
56
+ regctl: new Regctl(),
57
+ undock: new Undock()
36
58
});
37
59
let toolDir;
38
60
if (!(await Docker.isAvailable()) || input.source) {
@@ -71,7 +93,9 @@ actionsToolkit.run(
71
93
return;
72
94
}
73
95
const install = new Install({
74
- runDir: stateHelper.runDir
96
+ runDir: stateHelper.runDir,
97
+ regctl: new Regctl(),
98
+ undock: new Undock()
75
99
});
76
100
await install.tearDown();
77
101
}
0 commit comments