Skip to content

Commit

Permalink
Trying to fix multi-platform QEMU
Browse files Browse the repository at this point in the history
  • Loading branch information
amarburg committed Oct 20, 2023
1 parent 329f514 commit 383aba3
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
packages: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# Need the docker-container driver to export to cache
- name: Set up Docker Buildx
Expand All @@ -53,28 +53,28 @@ jobs:
#
# Build CI image
#
- name: Docker metadata for build image
if: env.PUSH == 'true'
id: ci_meta
uses: docker/[email protected]
with:
images: ghcr.io/${{ github.repository }}/ci
tags: |
type=raw,value=${{ matrix.ROS_DISTRO }}
# - name: Docker metadata for build image
# if: env.PUSH == 'true'
# id: ci_meta
# uses: docker/[email protected]
# with:
# images: ghcr.io/${{ github.repository }}/ci
# tags: |
# type=raw,value=${{ matrix.ROS_DISTRO }}

- name: Build and push the build stage "ci"
if: env.PUSH == 'true'
uses: docker/[email protected]
with:
context: .docker
file: .docker/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
target: ci
tags: ${{ steps.ci_meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ env.PUSH }}
cache-from: type=gha
cache-to: type=gha,mode=max
# - name: Build and push the build stage "ci"
# if: env.PUSH == 'true'
# uses: docker/[email protected]
# with:
# context: .docker
# file: .docker/Dockerfile
# build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
# target: ci
# tags: ${{ steps.ci_meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# push: ${{ env.PUSH }}
# cache-from: type=gha
# cache-to: type=gha,mode=max

#
# Build complete image
Expand All @@ -89,6 +89,9 @@ jobs:
type=raw,value=${{ matrix.ROS_DISTRO }}-latest
type=raw,value=latest
- name: This does something to QEMU?
run: docker run --privileged multiarch/qemu-user-static:latest --reset -p yes --credential yes

- name: Build and push full image
uses: docker/[email protected]
with:
Expand Down

0 comments on commit 383aba3

Please sign in to comment.