Skip to content

Debug issues in docker export #169

Debug issues in docker export

Debug issues in docker export #169

Workflow file for this run

on:
push:
paths-ignore:
- 'README.md'
- 'CHANGELOG.rst'
pull_request:
repository_dispatch:
types: [fog-ros-baseimage-update]
workflow_dispatch:
jobs:
cross_compile:
name: Build & push
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- architecture: amd64
- architecture: riscv64
- architecture: arm64
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cross-compile mocap-pose and export
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.builder
build-args: TARGET_ARCHITECTURE=${{ matrix.architecture }}
tags: mocap-pose:dev-${{ matrix.architecture }}
#load: true
outputs: type=docker,dest=/tmp/mocap-pose-${{ matrix.architecture }}.tar
- name: Copy ROS2 installation directory
run: |
#docker image inspect mocap-pose:dev-${{ matrix.architecture }}
docker load --input /tmp/mocap-pose-${{ matrix.architecture }}.tar
docker run --rm -d --name=tmp-container-${{ matrix.architecture }} -t mocap-pose:dev-${{ matrix.architecture }} |
docker cp tmp-container-${{ matrix.architecture }}:install.xz install-${{ matrix.architecture }}.xz
docker stop tmp-container-${{ matrix.architecture }}
- name: Upload install-${{ matrix.architecture }}.xz artifact
uses: actions/upload-artifact@v3
with:
name: install-${{ matrix.architecture }}
path: install-${{ matrix.architecture }}.xz
build:
name: Build & push
needs: cross_compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: amd64,riscv64,arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/tiiuae/tii-mocap-pose
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: github.event_name == 'push'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download install-amd64.xz artifact
uses: actions/download-artifact@v3
with:
name: install-amd64
path: install-amd64.xz
- name: Download install-riscv64.xz artifact
uses: actions/download-artifact@v3
with:
name: install-riscv64
path: install-riscv64.xz
- name: Download install-arm64.xz artifact
uses: actions/download-artifact@v3
with:
name: install-arm64
path: install-arm64.xz
- name: Build image and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/riscv64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}