mirror of
https://github.com/docker/setup-qemu-action.git
synced 2026-06-28 20:15:08 +00:00
docs: add multi-architecture build example to README
Fixes #95 Signed-off-by: ssdwgg <1982549567@qq.com>
This commit is contained in:
parent
e9a73d0538
commit
f497a4ac27
1 changed files with 30 additions and 0 deletions
30
README.md
30
README.md
|
|
@ -35,6 +35,36 @@ jobs:
|
|||
uses: docker/setup-qemu-action@v4
|
||||
```
|
||||
|
||||
### Multi-architecture build example
|
||||
|
||||
```yaml
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v4
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: user/app:latest
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> If you are using [`docker/setup-buildx-action`](https://github.com/docker/setup-buildx-action),
|
||||
> this action should come before it:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue