build-push-action/.github/workflows/setup-buildx-ci.yml
CrazyMax e9cb922263
Fix and cleanup of v2 setup actions
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-08-16 04:14:43 +02:00

161 lines
3.5 KiB
YAML

name: setup-buildx-ci
on:
push:
branches:
- master
- v2-working-branch # remove when merged to master
paths:
- .github/workflows/setup-buildx-ci.yml
- setup-buildx/**
pull_request:
branches:
- master
- v2-working-branch # remove when merged to master
paths:
- .github/workflows/setup-buildx-ci.yml
- setup-buildx/**
jobs:
main:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
buildx-version:
- latest
- v0.2.2
- ""
steps:
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Set up Docker Buildx
id: buildx
uses: ./setup-buildx/
with:
version: ${{ matrix.buildx-version }}
-
name: Builder instance name
run: echo ${{ steps.buildx.outputs.name }}
-
name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Dump context
uses: crazy-max/ghaction-dump-context@v1
multi:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Set up Docker Buildx 1
id: buildx1
uses: ./setup-buildx/
-
name: Builder 1 instance name
run: echo ${{ steps.buildx1.outputs.name }}
-
name: Set up Docker Buildx 2
id: buildx2
uses: ./setup-buildx/
-
name: Builder 2 instance name
run: echo ${{ steps.buildx2.outputs.name }}
install:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Set up Docker Buildx
uses: ./setup-buildx/
with:
install: true
-
name: Check cmd
run: |
docker build --help
use:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
use:
- true
- false
steps:
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Set up Docker Buildx
id: buildx
uses: ./setup-buildx/
with:
use: ${{ matrix.use }}
-
name: List builder instances
run: docker buildx ls
driver:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
driver-opt:
- image=moby/buildkit:latest
- image=moby/buildkit:master
steps:
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Set up Docker Buildx
id: buildx
uses: ./setup-buildx/
with:
driver: docker-container
driver-opt: ${{ matrix.driver-opt }}
with-qemu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
buildx-version:
- latest
- v0.2.2
- ""
qemu-platforms:
- all
- arm64,riscv64,arm
steps:
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Set up QEMU
uses: ./setup-qemu/
with:
platforms: ${{ matrix.qemu-platforms }}
-
name: Set up Docker Buildx
id: buildx
uses: ./setup-buildx/
with:
version: ${{ matrix.buildx-version }}
-
name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Builder instance name
run: echo ${{ steps.buildx.outputs.name }}