1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

ci: simple gha workflow to build docker daemon

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-03-14 06:33:50 +01:00
parent 82f2073359
commit da068165f6
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
2 changed files with 69 additions and 0 deletions

45
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: ci
on:
workflow_dispatch:
push:
branches:
- 'master'
- '[0-9]+.[0-9]{2}'
tags:
- 'v*'
pull_request:
env:
BUNDLES_OUTPUT: ./bundles
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
target:
- binary
- dynbinary
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build
uses: docker/bake-action@v1
with:
targets: ${{ matrix.target }}
-
name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.target }}
path: ${{ env.BUNDLES_OUTPUT }}/${{ matrix.target }}-daemon/*
if-no-files-found: error

24
docker-bake.hcl Normal file
View file

@ -0,0 +1,24 @@
variable "BUNDLES_OUTPUT" {
default = "./bundles"
}
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}
group "default" {
targets = ["binary"]
}
target "binary" {
inherits = ["_common"]
target = "binary"
output = [BUNDLES_OUTPUT]
}
target "dynbinary" {
inherits = ["binary"]
target = "dynbinary"
}