name: ci on: schedule: - cron: '0 10 * * *' # everyday at 10am push: branches: - 'master' - 'releases/v*' tags: - 'v*' pull_request: branches: - 'master' - 'releases/v*' jobs: main: runs-on: ubuntu-latest strategy: fail-fast: false matrix: buildx-version: - latest - v0.4.1 - "" steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Docker Buildx id: buildx uses: ./ with: version: ${{ matrix.buildx-version }} - name: Inspect builder run: | echo "Name: ${{ steps.buildx.outputs.name }}" echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" echo "Status: ${{ steps.buildx.outputs.status }}" echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ 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 - name: Set up Docker Buildx 1 id: buildx1 uses: ./ - name: Inspect builder 1 run: | echo "Name: ${{ steps.buildx1.outputs.name }}" echo "Endpoint: ${{ steps.buildx1.outputs.endpoint }}" echo "Status: ${{ steps.buildx1.outputs.status }}" echo "Flags: ${{ steps.buildx1.outputs.flags }}" echo "Platforms: ${{ steps.buildx1.outputs.platforms }}" - name: Set up Docker Buildx 2 id: buildx2 uses: ./ - name: Inspect builder 2 run: | echo "Name: ${{ steps.buildx2.outputs.name }}" echo "Endpoint: ${{ steps.buildx2.outputs.endpoint }}" echo "Status: ${{ steps.buildx2.outputs.status }}" echo "Flags: ${{ steps.buildx2.outputs.flags }}" echo "Platforms: ${{ steps.buildx2.outputs.platforms }}" error: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Stop docker run: | sudo systemctl stop docker - name: Set up Docker Buildx id: buildx continue-on-error: true uses: ./ - name: Check run: | echo "${{ toJson(steps.buildx) }}" if [ "${{ steps.buildx.outcome }}" != "failure" ] || [ "${{ steps.buildx.conclusion }}" != "success" ]; then echo "::error::Should have failed" exit 1 fi - name: Dump context if: always() uses: crazy-max/ghaction-dump-context@v1 debug: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Create Dockerfile run: | cat > ./Dockerfile <- --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 - 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: endpoint: mycontext env: DOCKER_CONTEXT: mycontext config: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Create buildkitd conf run: | cat > /tmp/buildkitd.toml < ./Dockerfile < ./Dockerfile < ./Dockerfile <