mirror of
https://github.com/docker/build-push-action.git
synced 2024-11-27 05:09:03 +00:00
Add isolated builders example
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
8954ded19b
commit
bd6a01893d
45
README.md
45
README.md
@ -18,6 +18,7 @@ ___
|
||||
|
||||
* [Usage](#usage)
|
||||
* [Quick start](#quick-start)
|
||||
* [Isolated builders](#isolated-builders)
|
||||
* [Multi-platform image](#multi-platform-image)
|
||||
* [Git context](#git-context)
|
||||
* [Leverage GitHub cache](#leverage-github-cache)
|
||||
@ -80,6 +81,48 @@ jobs:
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
```
|
||||
|
||||
### Isolated builders
|
||||
|
||||
```yaml
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
|
||||
jobs:
|
||||
multi-builders:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
uses: docker/setup-buildx-action@master
|
||||
id: builder1
|
||||
-
|
||||
uses: docker/setup-buildx-action@master
|
||||
id: builder2
|
||||
-
|
||||
name: Builder 1 name
|
||||
run: echo ${{ steps.builder1.outputs.name }}
|
||||
-
|
||||
name: Builder 2 name
|
||||
run: echo ${{ steps.builder2.outputs.name }}
|
||||
-
|
||||
name: Build against builder1
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.builder1.outputs.name }}
|
||||
target: mytarget1
|
||||
-
|
||||
name: Build against builder2
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.builder2.outputs.name }}
|
||||
target: mytarget2
|
||||
```
|
||||
|
||||
### Multi-platform image
|
||||
|
||||
```yaml
|
||||
@ -186,7 +229,7 @@ on:
|
||||
branches: master
|
||||
|
||||
jobs:
|
||||
main:
|
||||
github-cache:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
|
Loading…
Reference in New Issue
Block a user