mirror of
https://github.com/docker/setup-qemu-action.git
synced 2026-04-08 15:06:36 +00:00
Merge 4e49e2b632 into f4e8deed0c
This commit is contained in:
commit
11c8235ef5
38
README.md
38
README.md
@ -13,6 +13,7 @@ GitHub Action to install [QEMU](https://github.com/qemu/qemu) static binaries.
|
|||||||
___
|
___
|
||||||
|
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
|
* [Multi-platform build example](#multi-platform-build-example)
|
||||||
* [Customizing](#customizing)
|
* [Customizing](#customizing)
|
||||||
* [inputs](#inputs)
|
* [inputs](#inputs)
|
||||||
* [outputs](#outputs)
|
* [outputs](#outputs)
|
||||||
@ -48,6 +49,43 @@ jobs:
|
|||||||
> uses: docker/setup-buildx-action@v4
|
> uses: docker/setup-buildx-action@v4
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
|
### Multi-platform build example
|
||||||
|
|
||||||
|
The following example shows how to use this action to build and push a multi-platform image for `linux/amd64` and `linux/arm64` using [Buildx](https://github.com/docker/buildx):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v4
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v4
|
||||||
|
-
|
||||||
|
name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: user/app:latest
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
```
|
||||||
|
|
||||||
## Customizing
|
## Customizing
|
||||||
|
|
||||||
### inputs
|
### inputs
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user