Compare commits

...

4 Commits

Author SHA1 Message Date
Solomon Jacobs ca7fc44a06
Merge d11e3282b2 into fcd3152d8a 2025-03-13 15:15:37 -06:00
Tõnis Tiigi fcd3152d8a
Merge pull request #207 from crazy-max/note-setup-buildx
readme: note about usage with setup-buildx-action
2025-03-11 08:34:46 -07:00
CrazyMax 6bc7671629
readme: note about usage with setup-buildx-action
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-03-05 10:58:39 +01:00
Solomon Jacobs d11e3282b2 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 <solomonjacobs@protonmail.com>
2024-12-15 10:54:34 +01:00
1 changed files with 33 additions and 0 deletions

View File

@ -33,8 +33,41 @@ jobs:
-
name: Set up QEMU
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]
> 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
### inputs