Skip to content

Commit 2910929

Browse files
authored
Merge pull request #202 from crazy-max/binfmt-version
display binfmt version
2 parents 5964de0 + 7ffe24a commit 2910929

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
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 }}

dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)