feat: Add Jetson foxy docker image #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker CI | |
on: | |
push: | |
branches: ["master"] | |
paths: | |
- "**Dockerfile" | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: epflxplore/docker_commons | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- dockerfile: ./docker_foxy_desktop/Dockerfile | |
context: ./docker_foxy_desktop | |
target: xplore_common | |
tag: foxy-desktop | |
platform: linux/amd64 | |
- dockerfile: ./docker_humble_desktop/Dockerfile | |
context: ./docker_humble_desktop | |
target: xplore_common | |
tag: humble-desktop | |
platform: linux/amd64 | |
- dockerfile: ./docker_foxy_jetson/Dockerfile | |
context: ./docker_foxy_jetson | |
target: xplore_common | |
tag: foxy-jetson | |
platform: linux/arm64 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to GitHub Docker Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
file: ${{ matrix.dockerfile }} | |
context: ${{ matrix.context }} | |
target: ${{ matrix.target }} | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }} | |
platforms: ${{ matrix.platform }} | |
no-cache: false | |
pull: false | |
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-${{ matrix.tag }} | |
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-${{ matrix.tag }},mode=max | |
push: true |