mirror of
https://github.com/docker/setup-qemu-action.git
synced 2026-05-10 12:32:07 +00:00
Compare commits
4 Commits
5d9a97a7a5
...
b966ad2ad0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b966ad2ad0 | ||
|
|
e9a73d0538 | ||
|
|
39f273e99b | ||
|
|
11ca1cd666 |
28
README.md
28
README.md
@ -35,6 +35,34 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v4
|
uses: docker/setup-qemu-action@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
|
This action registers QEMU emulators with `binfmt_misc`, so later steps can run
|
||||||
|
containers built for another architecture on the GitHub-hosted runner.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: run-cross-platform-container
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
qemu-example:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v4
|
||||||
|
-
|
||||||
|
name: Run an arm64 container
|
||||||
|
run: docker run --rm --platform linux/arm64 alpine uname -m
|
||||||
|
```
|
||||||
|
|
||||||
|
The command above prints `aarch64` even though the job itself is running on
|
||||||
|
`ubuntu-latest`.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> `setup-qemu-action` enables user-mode emulation for registered platforms. It
|
||||||
|
> does not install `qemu-system-*` tools or add `qemu-*` binaries to your PATH.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> If you are using [`docker/setup-buildx-action`](https://github.com/docker/setup-buildx-action),
|
> If you are using [`docker/setup-buildx-action`](https://github.com/docker/setup-buildx-action),
|
||||||
> this action should come before it:
|
> this action should come before it:
|
||||||
|
|||||||
@ -26,5 +26,5 @@ outputs:
|
|||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node24'
|
using: 'node24'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.cjs'
|
||||||
post: 'dist/index.js'
|
post: 'dist/index.cjs'
|
||||||
|
|||||||
136
dist/index.cjs
generated
vendored
Normal file
136
dist/index.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
dist/index.cjs.map
generated
vendored
Normal file
7
dist/index.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
16
dist/index.js
generated
vendored
16
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
1
dist/index.js.map
generated
vendored
1
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
5407
dist/licenses.txt
generated
vendored
5407
dist/licenses.txt
generated
vendored
File diff suppressed because it is too large
Load Diff
3
dist/package.json
generated
vendored
3
dist/package.json
generated
vendored
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "module"
|
|
||||||
}
|
|
||||||
1
dist/sourcemap-register.cjs
generated
vendored
1
dist/sourcemap-register.cjs
generated
vendored
File diff suppressed because one or more lines are too long
@ -4,10 +4,11 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build src/main.ts --source-map --minify --license licenses.txt",
|
"build": "esbuild src/main.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs --sourcemap --minify && yarn run license",
|
||||||
"lint": "eslint --max-warnings=0 .",
|
"lint": "eslint --max-warnings=0 .",
|
||||||
"format": "eslint --fix .",
|
"format": "eslint --fix .",
|
||||||
"test": "vitest run"
|
"test": "vitest run",
|
||||||
|
"license": "generate-license-file --input package.json --output dist/licenses.txt --overwrite --ci --no-spinner --eol lf"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -30,12 +31,13 @@
|
|||||||
"@types/node": "^24.11.0",
|
"@types/node": "^24.11.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
||||||
"@typescript-eslint/parser": "^8.56.1",
|
"@typescript-eslint/parser": "^8.56.1",
|
||||||
"@vercel/ncc": "^0.38.4",
|
|
||||||
"@vitest/coverage-v8": "^4.0.18",
|
"@vitest/coverage-v8": "^4.0.18",
|
||||||
"@vitest/eslint-plugin": "^1.6.9",
|
"@vitest/eslint-plugin": "^1.6.9",
|
||||||
|
"esbuild": "^0.28.0",
|
||||||
"eslint": "^9.39.3",
|
"eslint": "^9.39.3",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-prettier": "^5.5.5",
|
"eslint-plugin-prettier": "^5.5.5",
|
||||||
|
"generate-license-file": "^4.1.1",
|
||||||
"globals": "^17.3.0",
|
"globals": "^17.3.0",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user