Skip to content

Commit 31629f6

Browse files
committed
switch to Docker exec
Signed-off-by: CrazyMax <[email protected]>
1 parent 6ae1d4d commit 31629f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as context from './context';
22
import * as core from '@actions/core';
33
import * as actionsToolkit from '@docker/actions-toolkit';
4+
45
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
5-
import {Exec} from '@docker/actions-toolkit/lib/exec';
66

77
interface Platforms {
88
supported: string[];
@@ -20,7 +20,7 @@ actionsToolkit.run(
2020
});
2121

2222
await core.group(`Pulling binfmt Docker image`, async () => {
23-
await Exec.getExecOutput('docker', ['pull', input.image], {
23+
await Docker.getExecOutput(['pull', input.image], {
2424
ignoreReturnCode: true
2525
}).then(res => {
2626
if (res.stderr.length > 0 && res.exitCode != 0) {
@@ -30,7 +30,7 @@ actionsToolkit.run(
3030
});
3131

3232
await core.group(`Image info`, async () => {
33-
await Exec.getExecOutput('docker', ['image', 'inspect', input.image], {
33+
await Docker.getExecOutput(['image', 'inspect', input.image], {
3434
ignoreReturnCode: true
3535
}).then(res => {
3636
if (res.stderr.length > 0 && res.exitCode != 0) {
@@ -40,7 +40,7 @@ actionsToolkit.run(
4040
});
4141

4242
await core.group(`Installing QEMU static binaries`, async () => {
43-
await Exec.getExecOutput('docker', ['run', '--rm', '--privileged', input.image, '--install', input.platforms], {
43+
await Docker.getExecOutput(['run', '--rm', '--privileged', input.image, '--install', input.platforms], {
4444
ignoreReturnCode: true
4545
}).then(res => {
4646
if (res.stderr.length > 0 && res.exitCode != 0) {
@@ -50,7 +50,7 @@ actionsToolkit.run(
5050
});
5151

5252
await core.group(`Extracting available platforms`, async () => {
53-
await Exec.getExecOutput('docker', ['run', '--rm', '--privileged', input.image], {
53+
await Docker.getExecOutput(['run', '--rm', '--privileged', input.image], {
5454
ignoreReturnCode: true,
5555
silent: true
5656
}).then(res => {

0 commit comments

Comments
 (0)