mirror of
https://gitea.com/docker/build-push-action.git
synced 2024-11-26 03:19:40 +01:00
Add isolated builders example
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
8954ded19b
commit
bd6a01893d
1 changed files with 44 additions and 1 deletions
45
README.md
45
README.md
|
@ -18,6 +18,7 @@ ___
|
||||||
|
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
* [Quick start](#quick-start)
|
* [Quick start](#quick-start)
|
||||||
|
* [Isolated builders](#isolated-builders)
|
||||||
* [Multi-platform image](#multi-platform-image)
|
* [Multi-platform image](#multi-platform-image)
|
||||||
* [Git context](#git-context)
|
* [Git context](#git-context)
|
||||||
* [Leverage GitHub cache](#leverage-github-cache)
|
* [Leverage GitHub cache](#leverage-github-cache)
|
||||||
|
@ -80,6 +81,48 @@ jobs:
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
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
|
### Multi-platform image
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -186,7 +229,7 @@ on:
|
||||||
branches: master
|
branches: master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
github-cache:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
|
|
Loading…
Reference in a new issue