Skip to content

Commit d11e328

Browse files
committed
Provide usage examples in README.md
We provide two simple examples of invoking `qemu-{arch}-static` (or more precisely, we let the kernel do the invocation.) Closes: #95 Signed-off-by: Solomon Jacobs <[email protected]>
1 parent 8b562ef commit d11e328

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@ jobs:
3333
-
3434
name: Set up QEMU
3535
uses: docker/setup-qemu-action@v3
36+
with:
37+
platforms: arm64, i386
38+
-
39+
name: Create an example binary for AArch64
40+
run: |
41+
go mod init hello
42+
cat << EOL > hello.go
43+
package main
44+
45+
func main() {
46+
println("Hello, AArch64!")
47+
}
48+
EOL
49+
GOARCH=arm64 go build hello.go
50+
-
51+
name: This would fail without docker/setup-qemu-action
52+
run: ./hello
53+
-
54+
name: You can also run images from other platforms
55+
run: docker run --platform linux/i386 hello-world
3656
```
3757
3858
## Customizing

0 commit comments

Comments
 (0)