Skip to content

Commit

Permalink
update docker-bake.hcl
Browse files Browse the repository at this point in the history
Signed-off-by: Masaya Kataoka <[email protected]>
  • Loading branch information
hakuturu583 committed Nov 13, 2024
1 parent 51ef533 commit 8726c6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/Docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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 }}
6 changes: 6 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 8726c6f

Please sign in to comment.