2021-02-17 12:53:15 -05:00
|
|
|
# Isolated builders
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-01-18 08:57:27 -05:00
|
|
|
- 'main'
|
2021-02-17 12:53:15 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
2022-05-05 13:24:32 -04:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2021-02-17 12:53:15 -05:00
|
|
|
id: builder1
|
|
|
|
-
|
2022-05-05 13:24:32 -04:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2021-02-17 12:53:15 -05:00
|
|
|
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
|
2022-05-05 13:24:32 -04:00
|
|
|
uses: docker/build-push-action@v3
|
2021-02-17 12:53:15 -05:00
|
|
|
with:
|
|
|
|
builder: ${{ steps.builder1.outputs.name }}
|
|
|
|
context: .
|
|
|
|
target: mytarget1
|
|
|
|
-
|
|
|
|
name: Build against builder2
|
2022-05-05 13:24:32 -04:00
|
|
|
uses: docker/build-push-action@v3
|
2021-02-17 12:53:15 -05:00
|
|
|
with:
|
|
|
|
builder: ${{ steps.builder2.outputs.name }}
|
|
|
|
context: .
|
|
|
|
target: mytarget2
|
|
|
|
```
|