Skip to content

Commit efe6ba7

Browse files
authored
Merge pull request #163 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.61.0
build(deps): bump @docker/actions-toolkit from 0.57.0 to 0.61.0
2 parents 7db7737 + 1211ebf commit efe6ba7

File tree

6 files changed

+79
-21
lines changed

6 files changed

+79
-21
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,3 +305,27 @@ jobs:
305305
docker info
306306
env:
307307
DOCKER_HOST: ${{ steps.setup_docker.outputs.tcp }}
308+
309+
undock-regctl-version:
310+
runs-on: ubuntu-latest
311+
strategy:
312+
fail-fast: false
313+
matrix:
314+
undock_version:
315+
- ''
316+
- v0.9.0
317+
regctl_version:
318+
- ''
319+
- v0.8.2
320+
steps:
321+
-
322+
name: Checkout
323+
uses: actions/checkout@v4
324+
-
325+
name: Set up Docker
326+
uses: ./
327+
with:
328+
version: type=image
329+
env:
330+
UNDOCK_VERSION: ${{ matrix.undock_version }}
331+
REGCTL_VERSION: ${{ matrix.regctl_version }}

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"packageManager": "yarn@3.6.3",
2828
"dependencies": {
2929
"@actions/core": "^1.11.1",
30-
"@docker/actions-toolkit": "^0.57.0"
30+
"@docker/actions-toolkit": "^0.61.0"
3131
},
3232
"devDependencies": {
3333
"@types/node": "^20.6.0",

src/main.ts

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ import * as core from '@actions/core';
55
import * as actionsToolkit from '@docker/actions-toolkit';
66
import {Install} from '@docker/actions-toolkit/lib/docker/install';
77
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';
812

913
import * as context from './context';
1014
import * as stateHelper from './state-helper';
1115

16+
const regctlDefaultVersion = 'v0.8.3';
17+
const undockDefaultVersion = 'v0.10.0';
18+
1219
actionsToolkit.run(
1320
// main
1421
async () => {
@@ -19,6 +26,29 @@ actionsToolkit.run(
1926
throw new Error(`'default' context cannot be used.`);
2027
}
2128

29+
if (input.source.type === 'image') {
30+
await core.group(`Download and install regctl`, async () => {
31+
const regclientInstall = new RegclientInstall();
32+
const regclientBinPath = await regclientInstall.download(
33+
process.env.REGCTL_VERSION && process.env.REGCTL_VERSION.trim()
34+
? process.env.REGCTL_VERSION
35+
: regctlDefaultVersion,
36+
true
37+
);
38+
await regclientInstall.install(regclientBinPath);
39+
});
40+
await core.group(`Download and install undock`, async () => {
41+
const undockInstall = new UndockInstall();
42+
const undockBinPath = await undockInstall.download(
43+
process.env.UNDOCK_VERSION && process.env.UNDOCK_VERSION.trim()
44+
? process.env.UNDOCK_VERSION
45+
: undockDefaultVersion,
46+
true
47+
);
48+
await undockInstall.install(undockBinPath);
49+
});
50+
}
51+
2252
let tcpPort: number | undefined;
2353
let tcpAddress: string | undefined;
2454
if (input.tcpPort) {
@@ -32,7 +62,9 @@ actionsToolkit.run(
3262
rootless: input.rootless,
3363
contextName: input.context || 'setup-docker-action',
3464
daemonConfig: input.daemonConfig,
35-
localTCPPort: tcpPort
65+
localTCPPort: tcpPort,
66+
regctl: new Regctl(),
67+
undock: new Undock()
3668
});
3769
let toolDir;
3870
if (!(await Docker.isAvailable()) || input.source) {
@@ -71,7 +103,9 @@ actionsToolkit.run(
71103
return;
72104
}
73105
const install = new Install({
74-
runDir: stateHelper.runDir
106+
runDir: stateHelper.runDir,
107+
regctl: new Regctl(),
108+
undock: new Undock()
75109
});
76110
await install.tearDown();
77111
}

yarn.lock

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ __metadata:
1212
languageName: node
1313
linkType: hard
1414

15-
"@actions/artifact@npm:^2.3.0":
16-
version: 2.3.0
17-
resolution: "@actions/artifact@npm:2.3.0"
15+
"@actions/artifact@npm:^2.3.2":
16+
version: 2.3.2
17+
resolution: "@actions/artifact@npm:2.3.2"
1818
dependencies:
1919
"@actions/core": ^1.10.0
2020
"@actions/github": ^5.1.1
@@ -28,13 +28,13 @@ __metadata:
2828
archiver: ^7.0.1
2929
jwt-decode: ^3.1.2
3030
unzip-stream: ^0.3.1
31-
checksum: f8197c410c2bf6985933e71bad4b441b269e5aab512c1232428d771b82aa3647e1ef0f81008130c8ab4222d3f9275ad9bd0f49e0263dfbf27c9228306e1dc779
31+
checksum: 78ee41b43800accb2f3527e1733217c43d53693e7f96ce2470b16890fb84f5c2ebaaa6048ccdb6cfe188b54c02779ec99623c6932558e757f6829cfde203cf2c
3232
languageName: node
3333
linkType: hard
3434

35-
"@actions/cache@npm:^4.0.2":
36-
version: 4.0.2
37-
resolution: "@actions/cache@npm:4.0.2"
35+
"@actions/cache@npm:^4.0.3":
36+
version: 4.0.3
37+
resolution: "@actions/cache@npm:4.0.3"
3838
dependencies:
3939
"@actions/core": ^1.11.1
4040
"@actions/exec": ^1.0.1
@@ -46,7 +46,7 @@ __metadata:
4646
"@azure/storage-blob": ^12.13.0
4747
"@protobuf-ts/plugin": ^2.9.4
4848
semver: ^6.3.1
49-
checksum: 208f11238a26194f331b329bb99d50a87c1a3ccef1dbae181e5c142b3faf41715203e0c5cbc491519d3d97540a68fbd418c25fb6e16caabf76248c40867c02b4
49+
checksum: ee9c2a21a70bd3f35c63f302af478e23f135c26deb77ea2e4eed29c62766a4b201fc7435651c0d56fa504c02d203107e3bdfda1dba18a3ee09338e1dfc3f2fe8
5050
languageName: node
5151
linkType: hard
5252

@@ -1101,12 +1101,12 @@ __metadata:
11011101
languageName: node
11021102
linkType: hard
11031103

1104-
"@docker/actions-toolkit@npm:^0.57.0":
1105-
version: 0.57.0
1106-
resolution: "@docker/actions-toolkit@npm:0.57.0"
1104+
"@docker/actions-toolkit@npm:^0.61.0":
1105+
version: 0.61.0
1106+
resolution: "@docker/actions-toolkit@npm:0.61.0"
11071107
dependencies:
1108-
"@actions/artifact": ^2.3.0
1109-
"@actions/cache": ^4.0.2
1108+
"@actions/artifact": ^2.3.2
1109+
"@actions/cache": ^4.0.3
11101110
"@actions/core": ^1.11.1
11111111
"@actions/exec": ^1.1.1
11121112
"@actions/github": ^6.0.0
@@ -1126,7 +1126,7 @@ __metadata:
11261126
semver: ^7.7.1
11271127
tar-stream: ^3.1.7
11281128
tmp: ^0.2.3
1129-
checksum: d25b85d85d79a2ddb01ed7cd858d2c0dedae7545a1fd991517ae71aa53ccd91e3b295ed8a5b48f4c9a7b6486cdf25a47a9e123135f8bffac47af1c60551d268d
1129+
checksum: 60cc6c8f5bde8221a3d6a40c15258d44a468950353098f1814d8af3a14131df9c41df5b87298cd82f5c77aa4e36e262c15a5bb0cc03ea2857bea18c9e0952d80
11301130
languageName: node
11311131
linkType: hard
11321132

@@ -3341,7 +3341,7 @@ __metadata:
33413341
resolution: "docker-setup-docker@workspace:."
33423342
dependencies:
33433343
"@actions/core": ^1.11.1
3344-
"@docker/actions-toolkit": ^0.57.0
3344+
"@docker/actions-toolkit": ^0.61.0
33453345
"@types/node": ^20.6.0
33463346
"@typescript-eslint/eslint-plugin": ^6.6.0
33473347
"@typescript-eslint/parser": ^6.6.0

0 commit comments

Comments
 (0)