Skip to content

Feature/dockerfile traffic sim #8130

Feature/dockerfile traffic sim

Feature/dockerfile traffic sim #8130

Workflow file for this run

name: Docker
on:
pull_request:
paths:
- "**"
- "!docs/**"
- "!README.md"
- "!CONTRIBUTING.md"
- "!.github/**"
- ".github/workflows/Docker.yaml"
- "!mkdocs.yml"
- "!pyproject.toml"
- "!poetry.lock"
workflow_dispatch:
inputs:
version:
description: version of the scenario_simulator_v2
required: true
jobs:
push_docker:
name: Push Docker Image
runs-on: ubuntu-22.04
timeout-minutes: 720
strategy:
matrix:
rosdistro: [humble]
target: [base_amd64, base_arm64, base_traffic_simulator]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
- name: Install docker for ubuntu runner
uses: docker/setup-buildx-action@v3
- name: Install QEMU
uses: docker/setup-qemu-action@v3
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Qemu Setup
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --use
docker buildx inspect --bootstrap
- name: Build (${{ matrix.target }})
if: github.event_name == 'pull_request'
uses: docker/bake-action@v3
with:
files: |
./docker-bake.hcl
workdir: .
set: |
*.cache-to=type=gha,mode=max
*.cache-from=type=gha
push: false
targets: |
${{ matrix.rosdistro }}_${{ matrix.target }}
- name: Build and push (${{ matrix.target }})
if: github.event_name == 'workflow_dispatch'
uses: docker/bake-action@v3
with:
files: |
./docker-bake.hcl
workdir: .
set: |
*.cache-to=type=gha,mode=max
*.cache-from=type=gha
*.tags=ghcr.io/tier4/scenario_simulator_v2:humble-${{ github.event.inputs.version }}
push: true
targets: |
${{ matrix.rosdistro }}_${{ matrix.target }}