2020-08-18 15:40:31 +00:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- releases/v*
|
|
|
|
paths-ignore:
|
2020-08-18 15:45:23 +00:00
|
|
|
- "**.md"
|
2020-08-18 15:40:31 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- releases/v*
|
|
|
|
paths-ignore:
|
2020-08-18 15:45:23 +00:00
|
|
|
- "**.md"
|
2020-08-18 15:40:31 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
main:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
buildx-version:
|
|
|
|
- latest
|
|
|
|
- v0.2.2
|
|
|
|
- ""
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2020-08-19 11:25:48 +00:00
|
|
|
uses: actions/checkout@v2.3.2
|
2020-08-18 15:40:31 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: ./
|
|
|
|
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
|
2020-08-19 11:25:48 +00:00
|
|
|
uses: actions/checkout@v2.3.2
|
2020-08-18 15:40:31 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx 1
|
|
|
|
id: buildx1
|
|
|
|
uses: ./
|
|
|
|
-
|
|
|
|
name: Builder 1 instance name
|
|
|
|
run: echo ${{ steps.buildx1.outputs.name }}
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx 2
|
|
|
|
id: buildx2
|
|
|
|
uses: ./
|
|
|
|
-
|
|
|
|
name: Builder 2 instance name
|
|
|
|
run: echo ${{ steps.buildx2.outputs.name }}
|
|
|
|
|
|
|
|
install:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2020-08-19 11:25:48 +00:00
|
|
|
uses: actions/checkout@v2.3.2
|
2020-08-18 15:40:31 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: ./
|
|
|
|
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
|
2020-08-19 11:25:48 +00:00
|
|
|
uses: actions/checkout@v2.3.2
|
2020-08-18 15:40:31 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
use: ${{ matrix.use }}
|
|
|
|
-
|
|
|
|
name: List builder instances
|
|
|
|
run: docker buildx ls
|
|
|
|
|
|
|
|
driver:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2020-09-03 14:23:15 +00:00
|
|
|
driver-opts:
|
2020-08-18 15:40:31 +00:00
|
|
|
- image=moby/buildkit:latest
|
2020-09-03 14:28:23 +00:00
|
|
|
- |
|
|
|
|
image=moby/buildkit:master
|
|
|
|
network=host
|
2020-08-18 15:40:31 +00:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2020-08-19 11:25:48 +00:00
|
|
|
uses: actions/checkout@v2.3.2
|
2020-08-18 15:40:31 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
driver: docker-container
|
2020-09-03 14:28:23 +00:00
|
|
|
driver-opts: ${{ matrix.driver-opts }}
|
2020-08-18 15:40:31 +00:00
|
|
|
|
2020-08-27 00:41:25 +00:00
|
|
|
docker-driver:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2.3.2
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: ./
|
|
|
|
id: builder
|
|
|
|
with:
|
|
|
|
driver: docker
|
|
|
|
-
|
|
|
|
name: Verify
|
|
|
|
run: |
|
|
|
|
[[ "${{ steps.builder.outputs.name }}" = "default" ]]
|
|
|
|
docker buildx inspect
|
|
|
|
docker buildx inspect | grep Driver | grep docker
|
|
|
|
docker buildx inspect | grep Status | grep running
|
|
|
|
|
2020-09-08 13:52:09 +00:00
|
|
|
endpoint:
|
2020-09-06 18:11:21 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
dind:
|
|
|
|
image: docker:dind
|
|
|
|
options: >-
|
|
|
|
--privileged
|
|
|
|
--health-cmd "docker info"
|
|
|
|
--health-interval 10s
|
|
|
|
--health-timeout 5s
|
|
|
|
--health-retries 5
|
|
|
|
env:
|
|
|
|
DOCKER_TLS_CERTDIR: ""
|
|
|
|
ports:
|
|
|
|
- 2375:2375
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2.3.2
|
|
|
|
-
|
|
|
|
name: Create context
|
|
|
|
run: |
|
|
|
|
docker context create mycontext --docker host=tcp://127.0.0.1:2375
|
|
|
|
-
|
|
|
|
name: Check context
|
|
|
|
run: |
|
|
|
|
docker --context mycontext info
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: ./
|
|
|
|
with:
|
2020-09-08 13:52:09 +00:00
|
|
|
endpoint: mycontext
|
2020-09-06 18:11:21 +00:00
|
|
|
|
2020-08-24 12:07:14 +00:00
|
|
|
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.2
|
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@master
|
|
|
|
with:
|
|
|
|
platforms: ${{ matrix.qemu-platforms }}
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.buildx-version }}
|
|
|
|
-
|
|
|
|
name: Available platforms
|
|
|
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
|
|
|
-
|
|
|
|
name: Builder instance name
|
|
|
|
run: echo ${{ steps.buildx.outputs.name }}
|