From 8726c6fcd6a42c298be6e2dd3d913607b090903f Mon Sep 17 00:00:00 2001 From: Masaya Kataoka Date: Wed, 13 Nov 2024 17:18:53 +0900 Subject: [PATCH] update docker-bake.hcl Signed-off-by: Masaya Kataoka --- .github/workflows/Docker.yaml | 10 +++++----- docker-bake.hcl | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Docker.yaml b/.github/workflows/Docker.yaml index 6e550ea098d..d8746cf6857 100644 --- a/.github/workflows/Docker.yaml +++ b/.github/workflows/Docker.yaml @@ -25,7 +25,7 @@ jobs: strategy: matrix: rosdistro: [humble] - arch: [amd64, arm64] + target: [base_amd64, base_arm64, base_traffic_simulator] steps: - name: Free Disk Space (Ubuntu) @@ -54,7 +54,7 @@ jobs: docker buildx create --use docker buildx inspect --bootstrap - - name: Build (${{ matrix.arch }}) + - name: Build (${{ matrix.target }}) if: github.event_name == 'pull_request' uses: docker/bake-action@v3 with: @@ -66,9 +66,9 @@ jobs: *.cache-from=type=gha push: false targets: | - ${{ matrix.rosdistro }}_base_${{ matrix.arch }} + ${{ matrix.rosdistro }}_${{ matrix.target }} - - name: Build and push (${{ matrix.arch }}) + - name: Build and push (${{ matrix.target }}) if: github.event_name == 'workflow_dispatch' uses: docker/bake-action@v3 with: @@ -81,4 +81,4 @@ jobs: *.tags=ghcr.io/tier4/scenario_simulator_v2:humble-${{ github.event.inputs.version }} push: true targets: | - ${{ matrix.rosdistro }}_base_${{ matrix.arch }} + ${{ matrix.rosdistro }}_${{ matrix.target }} diff --git a/docker-bake.hcl b/docker-bake.hcl index fac2c5237a4..c47ba4281dc 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -14,6 +14,12 @@ target "base_arm64" { platforms = ["linux/arm64/v8"] } +target "base_traffic_simulator" { + target = "build-stage" + dockerfile = "Dockerfile.traffic_simulator" + platforms = ["linux/amd64"] +} + target "humble" { inherits = [base] name = "humble_${base}"