Skip to content

Commit 17bc18b

Browse files
committed
display binfmt version
Signed-off-by: CrazyMax <[email protected]>
1 parent 5964de0 commit 17bc18b

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/ci.yml

+19
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,22 @@ jobs:
102102
-
103103
name: Available platforms
104104
run: echo ${{ steps.qemu.outputs.platforms }}
105+
106+
version:
107+
runs-on: ubuntu-latest
108+
strategy:
109+
fail-fast: false
110+
matrix:
111+
image:
112+
- tonistiigi/binfmt:master
113+
- tonistiigi/binfmt:latest
114+
- tonistiigi/binfmt:qemu-v7.0.0
115+
steps:
116+
-
117+
name: Checkout
118+
uses: actions/checkout@v4
119+
-
120+
name: Set up QEMU
121+
uses: ./
122+
with:
123+
image: ${{ matrix.image }}

src/main.ts

+10
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ actionsToolkit.run(
3333
});
3434
});
3535

36+
await core.group(`Binfmt version`, async () => {
37+
await Docker.getExecOutput(['run', '--rm', '--privileged', input.image, '--version'], {
38+
ignoreReturnCode: true
39+
}).then(res => {
40+
if (res.stderr.length > 0 && res.exitCode != 0) {
41+
throw new Error(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error');
42+
}
43+
});
44+
});
45+
3646
await core.group(`Installing QEMU static binaries`, async () => {
3747
await Docker.getExecOutput(['run', '--rm', '--privileged', input.image, '--install', input.platforms], {
3848
ignoreReturnCode: true

0 commit comments

Comments
 (0)