ci: bin-image workflow
This workflow will just build the bin-image bake target. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
ae1ca67178
commit
135d8f04f9
2 changed files with 78 additions and 2 deletions
72
.github/workflows/bin-image.yml
vendored
Normal file
72
.github/workflows/bin-image.yml
vendored
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
name: bin-image
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
- '[0-9]+.[0-9]+'
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
PLATFORM: Moby Engine
|
||||||
|
PRODUCT: Moby
|
||||||
|
DEFAULT_PRODUCT_LICENSE: Moby
|
||||||
|
PACKAGER_NAME: Moby
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate-dco:
|
||||||
|
uses: ./.github/workflows/.dco.yml
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs:
|
||||||
|
- validate-dco
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
-
|
||||||
|
name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: moby-bin
|
||||||
|
### versioning strategy
|
||||||
|
## push semver tag v23.0.0
|
||||||
|
# moby/moby-bin:23.0.0
|
||||||
|
# moby/moby-bin:latest
|
||||||
|
## push semver prelease tag v23.0.0-beta.1
|
||||||
|
# moby/moby-bin:23.0.0-beta.1
|
||||||
|
## push on master
|
||||||
|
# moby/moby-bin:master
|
||||||
|
## push on 23.0 branch
|
||||||
|
# moby/moby-bin:23.0
|
||||||
|
tags: |
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
|
uses: docker/bake-action@v2
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
./docker-bake.hcl
|
||||||
|
${{ steps.meta.outputs.bake-file }}
|
||||||
|
targets: bin-image-cross
|
||||||
|
set: |
|
||||||
|
*.output=type=cacheonly
|
|
@ -59,6 +59,11 @@ variable "GITHUB_SHA" {
|
||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Special target: https://github.com/docker/metadata-action#bake-definition
|
||||||
|
target "docker-metadata-action" {
|
||||||
|
tags = ["moby-bin:local"]
|
||||||
|
}
|
||||||
|
|
||||||
# Defines the output folder
|
# Defines the output folder
|
||||||
variable "DESTDIR" {
|
variable "DESTDIR" {
|
||||||
default = ""
|
default = ""
|
||||||
|
@ -157,8 +162,7 @@ target "all-cross" {
|
||||||
#
|
#
|
||||||
|
|
||||||
target "bin-image" {
|
target "bin-image" {
|
||||||
inherits = ["all"]
|
inherits = ["all", "docker-metadata-action"]
|
||||||
tags = ["moby-bin:local"]
|
|
||||||
output = ["type=docker"]
|
output = ["type=docker"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue