Skip to content

Commit 4cf768c

Browse files
authored
Merge pull request #142 from crazy-max/group
ci: group job
2 parents aeda4d1 + a841142 commit 4cf768c

3 files changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,32 @@ jobs:
265265
*.platform=linux/amd64
266266
*.output=type=image,"name=localhost:5000/name/app:v1.0.0,localhost:5000/name/app:latest",push=true
267267
*.tags=
268+
269+
group:
270+
runs-on: ubuntu-latest
271+
services:
272+
registry:
273+
image: registry:2
274+
ports:
275+
- 5000:5000
276+
steps:
277+
-
278+
name: Checkout
279+
uses: actions/checkout@v3
280+
-
281+
name: Set up Docker Buildx
282+
uses: docker/setup-buildx-action@v2
283+
with:
284+
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
285+
driver-opts: |
286+
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
287+
network=host
288+
-
289+
name: Build and push
290+
uses: ./
291+
with:
292+
workdir: ./test/group
293+
push: true
294+
set: |
295+
t1.tags=localhost:5000/name/app:t1
296+
t2.tags=localhost:5000/name/app:t2

test/group/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM busybox AS t1
4+
RUN echo "Hello t1"
5+
6+
FROM busybox AS t2
7+
RUN echo "Hello t2"

test/group/docker-bake.hcl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
group "default" {
2+
targets = ["t1", "t2"]
3+
}
4+
5+
target "t1" {
6+
target = "t1"
7+
}
8+
9+
target "t2" {
10+
target = "t2"
11+
}

0 commit comments

Comments
 (0)