Skip to content

Feature/arm_build_test #6381

Feature/arm_build_test

Feature/arm_build_test #6381

Workflow file for this run

name: Docker
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
pull_request:
paths:
- '**'
- '!docs/**'
- '!README.md'
- '!.github/**'
- '.github/workflows/Docker.yaml'
- '!mkdocs.yml'
push:
branches:
- master
release:
types: [published]
jobs:
build_docker_image:
name: Build Docker Image
runs-on: ${{ matrix.runs_on }}
timeout-minutes: 720
strategy:
matrix:
rosdistro: [humble]
runs_on: [ubuntu-22.04, macos-14] # macos-14 is added for arm support. See also https://x.com/github/status/1752458943245189120?s=20
steps:
- name: Install docker for mac runner
if: ${{ matrix.runs_on == 'macos-14'}}
run: brew install docker && dockerd
- name: Setup docker buildx
uses: docker/setup-buildx-action@v2
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v3
if: ${{ matrix.runs_on == 'ubuntu-22.04' }}
with:
files: |
./docker-bake.hcl
workdir: .
no-cache: true
push: ${{ github.event_name != 'pull_request' }}
targets: |
${{ matrix.rosdistro }}
set: |
*.platform=linux/amd64
- name: Build and push
uses: docker/bake-action@v3
if: ${{ matrix.runs_on == 'macos-14'}}
with:
files: |
./docker-bake.hcl
workdir: .
no-cache: true
push: ${{ github.event_name != 'pull_request' }}
targets: |
${{ matrix.rosdistro }}
set: |
*.platform=linux/arm64/v8