ci: group job

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-06-09 14:56:29 +02:00
parent aeda4d1cdb
commit a841142820
3 changed files with 47 additions and 0 deletions

View File

@ -265,3 +265,32 @@ jobs:
*.platform=linux/amd64
*.output=type=image,"name=localhost:5000/name/app:v1.0.0,localhost:5000/name/app:latest",push=true
*.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
View 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"

View File

@ -0,0 +1,11 @@
group "default" {
targets = ["t1", "t2"]
}
target "t1" {
target = "t1"
}
target "t2" {
target = "t2"
}