mirror of
https://github.com/docker/setup-qemu-action.git
synced 2025-04-20 03:38:59 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
fcd3152d8a | ||
|
6bc7671629 | ||
|
29109295f8 | ||
|
7ffe24aa9a | ||
|
17bc18bb05 |
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@ -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 }}
|
||||||
|
13
README.md
13
README.md
@ -35,6 +35,19 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> If you are using [`docker/setup-buildx-action`](https://github.com/docker/setup-buildx-action),
|
||||||
|
> this action should come before it:
|
||||||
|
>
|
||||||
|
> ```yaml
|
||||||
|
> -
|
||||||
|
> name: Set up QEMU
|
||||||
|
> uses: docker/setup-qemu-action@v3
|
||||||
|
> -
|
||||||
|
> name: Set up Docker Buildx
|
||||||
|
> uses: docker/setup-buildx-action@v3
|
||||||
|
> ```
|
||||||
|
|
||||||
## Customizing
|
## Customizing
|
||||||
|
|
||||||
### inputs
|
### inputs
|
||||||
|
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
10
src/main.ts
10
src/main.ts
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user