mirror of
https://github.com/docker/setup-qemu-action.git
synced 2025-07-13 02:43:13 +08:00
Merge d11e3282b262b2705465c1a56bec7e09710faa1f into fcd3152d8ad392d0e9c14d3f0de40f0a88b8ca0e
This commit is contained in:
commit
ca7fc44a06
20
README.md
20
README.md
@ -33,6 +33,26 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
with:
|
||||||
|
platforms: arm64, i386
|
||||||
|
-
|
||||||
|
name: Create an example binary for AArch64
|
||||||
|
run: |
|
||||||
|
go mod init hello
|
||||||
|
cat << EOL > hello.go
|
||||||
|
package main
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
println("Hello, AArch64!")
|
||||||
|
}
|
||||||
|
EOL
|
||||||
|
GOARCH=arm64 go build hello.go
|
||||||
|
-
|
||||||
|
name: This would fail without docker/setup-qemu-action
|
||||||
|
run: ./hello
|
||||||
|
-
|
||||||
|
name: You can also run images from other platforms
|
||||||
|
run: docker run --platform linux/i386 hello-world
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user