Merge pull request #202 from crazy-max/binfmt-version
Some checks failed
ci / default (push) Failing after 0s
ci / main (tonistiigi/binfmt:latest, all) (push) Failing after 0s
ci / main (tonistiigi/binfmt:latest, arm64,riscv64,arm) (push) Failing after 0s
ci / main (tonistiigi/binfmt:master, all) (push) Failing after 0s
ci / main (tonistiigi/binfmt:master, arm64,riscv64,arm) (push) Failing after 0s
ci / error (push) Failing after 0s
ci / cache-image (false) (push) Failing after 0s
ci / cache-image (true) (push) Failing after 0s
ci / version (tonistiigi/binfmt:latest) (push) Failing after 0s
ci / version (tonistiigi/binfmt:master) (push) Failing after 0s
ci / version (tonistiigi/binfmt:qemu-v7.0.0) (push) Failing after 0s
test / test (push) Failing after 0s
validate / prepare (push) Failing after 0s
validate / validate (push) Has been skipped

display binfmt version
This commit is contained in:
CrazyMax 2025-02-28 13:50:00 +01:00 committed by GitHub
commit 29109295f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 31 additions and 2 deletions

View File

@ -102,3 +102,22 @@ jobs:
- -
name: Available platforms name: Available platforms
run: echo ${{ steps.qemu.outputs.platforms }} run: echo ${{ steps.qemu.outputs.platforms }}
version:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- tonistiigi/binfmt:master
- tonistiigi/binfmt:latest
- tonistiigi/binfmt:qemu-v7.0.0
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: ./
with:
image: ${{ matrix.image }}

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -33,6 +33,16 @@ actionsToolkit.run(
}); });
}); });
await core.group(`Binfmt version`, async () => {
await Docker.getExecOutput(['run', '--rm', '--privileged', input.image, '--version'], {
ignoreReturnCode: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error');
}
});
});
await core.group(`Installing QEMU static binaries`, async () => { await core.group(`Installing QEMU static binaries`, async () => {
await Docker.getExecOutput(['run', '--rm', '--privileged', input.image, '--install', input.platforms], { await Docker.getExecOutput(['run', '--rm', '--privileged', input.image, '--install', input.platforms], {
ignoreReturnCode: true ignoreReturnCode: true