From a841142820d2b6272c77d46781b4711fe891db7b Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 9 Jun 2023 14:56:29 +0200 Subject: [PATCH] ci: group job Signed-off-by: CrazyMax --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ test/group/Dockerfile | 7 +++++++ test/group/docker-bake.hcl | 11 +++++++++++ 3 files changed, 47 insertions(+) create mode 100644 test/group/Dockerfile create mode 100644 test/group/docker-bake.hcl diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ba9340..b307a49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/test/group/Dockerfile b/test/group/Dockerfile new file mode 100644 index 0000000..e2145aa --- /dev/null +++ b/test/group/Dockerfile @@ -0,0 +1,7 @@ +# syntax=docker/dockerfile:1 + +FROM busybox AS t1 +RUN echo "Hello t1" + +FROM busybox AS t2 +RUN echo "Hello t2" diff --git a/test/group/docker-bake.hcl b/test/group/docker-bake.hcl new file mode 100644 index 0000000..af30e93 --- /dev/null +++ b/test/group/docker-bake.hcl @@ -0,0 +1,11 @@ +group "default" { + targets = ["t1", "t2"] +} + +target "t1" { + target = "t1" +} + +target "t2" { + target = "t2" +}