From bd6a01893d9c30c62db3bdf8e7c48aaaf942b9a8 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 29 Aug 2020 17:46:56 +0200 Subject: [PATCH] Add isolated builders example Signed-off-by: CrazyMax --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d17bbaa..e3c661d 100644 --- a/README.md +++ b/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: -