mirror of
https://github.com/docker/bake-action.git
synced 2026-01-22 20:32:21 +01:00
ci: group job
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
@@ -265,3 +265,32 @@ jobs:
|
|||||||
*.platform=linux/amd64
|
*.platform=linux/amd64
|
||||||
*.output=type=image,"name=localhost:5000/name/app:v1.0.0,localhost:5000/name/app:latest",push=true
|
*.output=type=image,"name=localhost:5000/name/app:v1.0.0,localhost:5000/name/app:latest",push=true
|
||||||
*.tags=
|
*.tags=
|
||||||
|
|
||||||
|
group:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
registry:
|
||||||
|
image: registry:2
|
||||||
|
ports:
|
||||||
|
- 5000:5000
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
with:
|
||||||
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
||||||
|
driver-opts: |
|
||||||
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
||||||
|
network=host
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
workdir: ./test/group
|
||||||
|
push: true
|
||||||
|
set: |
|
||||||
|
t1.tags=localhost:5000/name/app:t1
|
||||||
|
t2.tags=localhost:5000/name/app:t2
|
||||||
|
|||||||
7
test/group/Dockerfile
Normal file
7
test/group/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
FROM busybox AS t1
|
||||||
|
RUN echo "Hello t1"
|
||||||
|
|
||||||
|
FROM busybox AS t2
|
||||||
|
RUN echo "Hello t2"
|
||||||
11
test/group/docker-bake.hcl
Normal file
11
test/group/docker-bake.hcl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
group "default" {
|
||||||
|
targets = ["t1", "t2"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "t1" {
|
||||||
|
target = "t1"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "t2" {
|
||||||
|
target = "t2"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user