docker-build-push/.github/workflows/setup-buildx-ci.yml

120 lines
2.7 KiB
YAML

name: setup-buildx-ci
on:
push:
paths:
- .github/workflows/setup-buildx-ci.yml
- setup-buildx/**
pull_request:
paths:
- .github/workflows/setup-buildx-ci.yml
- setup-buildx/**
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
buildx-version:
- latest
- v0.2.2
steps:
-
name: Runner info
run: |
sudo apt-get install -y hwinfo
sudo hwinfo --short
sudo mount
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Set up Docker Buildx
id: buildx
uses: ./setup-buildx/
with:
buildx-version: ${{ matrix.buildx-version }}
-
name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Dump Env vars
run: env|sort
-
name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
-
name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
-
name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
-
name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
-
name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
-
name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
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
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:
buildx-version: ${{ matrix.buildx-version }}
-
name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}