Files
buildkit/.github/workflows/dockerd.yml
dependabot[bot] bc313d0f95 build(deps): bump actions/checkout from 7.0.0 to 7.0.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9c091bb21b...3d3c42e5aa)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-21 00:25:18 +00:00

137 lines
4.1 KiB
YAML

name: dockerd
permissions:
contents: read
on:
# TODO: add event to build on command in PR (e.g., /test-dockerd)
workflow_dispatch:
inputs:
version:
description: 'Docker version'
required: true
default: '25.0.2'
env:
SETUP_BUILDX_VERSION: "edge"
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"
TESTFLAGS: "-v --parallel=1 --timeout=30m"
jobs:
prepare:
runs-on: ubuntu-24.04
steps:
-
name: Prepare
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
INPUT_VERSION: ${{ inputs.version }}
with:
script: |
const version = core.getInput('version') || '25.0.2';
let build = 'true';
try {
new URL(version);
} catch (e) {
build = 'false';
}
core.exportVariable('DOCKER_VERSION', version);
core.exportVariable('DOCKER_BUILD', build);
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
with:
version: ${{ env.SETUP_BUILDX_VERSION }}
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
buildkitd-flags: --debug
-
name: Build
if: ${{ env.DOCKER_BUILD == 'true' }}
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: ${{ env.DOCKER_VERSION }}
target: binary
outputs: /tmp/moby
-
name: Rename binary
if: ${{ env.DOCKER_BUILD == 'true' }}
run: |
if [ -L "/tmp/moby/binary-daemon/dockerd" ]; then
mv -f $(readlink /tmp/moby/binary-daemon/dockerd) /tmp/moby/dockerd
fi
-
name: Download
if: ${{ env.DOCKER_BUILD != 'true' }}
run: |
mkdir -p /tmp/moby
cd /tmp/moby
wget -qO- "https://download.docker.com/linux/static/stable/x86_64/docker-${{ env.DOCKER_VERSION }}.tgz" | tar xvz --strip 1
-
name: Upload dockerd
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dockerd
path: /tmp/moby/dockerd
if-no-files-found: error
retention-days: 1
test:
runs-on: ubuntu-24.04
needs:
- prepare
strategy:
fail-fast: false
matrix:
worker:
- dockerd
- dockerd-containerd
pkg:
- ./client
- ./cmd/buildctl
- ./solver
- ./frontend
- ./frontend/dockerfile
typ:
- integration
include:
- pkg: ./...
skip-integration-tests: 1
steps:
-
name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
-
name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@04d248b84655b509d8c44dc1d6f990c879747487 # v4.0.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
with:
version: ${{ env.SETUP_BUILDX_VERSION }}
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
buildkitd-flags: --debug
-
name: Download dockerd
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dockerd
path: ./build/
-
name: Fix dockerd perms
run: |
chmod +x ./build/dockerd
-
name: Test
run: |
./hack/test ${{ matrix.typ }}
env:
TEST_DOCKERD: "1"
TEST_DOCKERD_BINARY: "./build/dockerd"
TESTPKGS: "${{ matrix.pkg }}"
TESTFLAGS: "${{ env.TESTFLAGS }} --run=//worker=${{ matrix.worker }}$"
SKIP_INTEGRATION_TESTS: "${{ matrix.skip-integration-tests }}"
CACHE_FROM: "type=gha,scope=build-integration-tests"
BUILDKIT_INTEGRATION_DOCKERD_FLAGS: |
--bip=10.66.66.1/24
--default-address-pool=base=10.66.66.0/16,size=24