From 039bc3d6cb5319af6a68d41baa8d36ba7043bbc1 Mon Sep 17 00:00:00 2001 From: Lukas Ostendorf Date: Fri, 27 Nov 2026 15:41:48 +0100 Subject: [PATCH 1/3] Add native multi-architecture docker-ros builds and manifests --- .github/workflows/docker-ros.yml | 60 ++++++++++++++++++++++++++++++-- .openads-dev-environment | 2 +- deployment/helm/Chart.yaml | 2 +- 3 files changed, 59 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-ros.yml b/.github/workflows/docker-ros.yml index a81739f..fac668f 100644 --- a/.github/workflows/docker-ros.yml +++ b/.github/workflows/docker-ros.yml @@ -11,9 +11,27 @@ on: - main workflow_dispatch: +permissions: + contents: read + packages: write + +# Architecture tags must not be overwritten by another run before assembly/cleanup. +concurrency: + group: docker-ros-${{ github.ref }} + cancel-in-progress: false + jobs: docker-ros: - runs-on: ubuntu-latest + strategy: + matrix: + target: [dev, run] + platform: [amd64, arm64] + include: + - platform: amd64 + runner: ubuntu-latest + - platform: arm64 + runner: ubuntu-24.04-arm + runs-on: ${{ matrix.runner }} steps: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main @@ -21,8 +39,9 @@ jobs: tool-cache: true - uses: ika-rwth-aachen/docker-ros@main with: - platform: amd64 - target: dev,run + platform: ${{ matrix.platform }} + target: ${{ matrix.target }} + enable-singlearch-push: true base-image: rwthika/ros2-cuda:jazzy-desktop-full enable-build-required-packages-only: "false" enable-recursive-vcs-import: "false" @@ -32,3 +51,38 @@ jobs: label-authors: Institute for Automotive Engineering (ika), RWTH Aachen University env: TARGET_CMAKE_ARGS: -DCMAKE_EXPORT_COMPILE_COMMANDS=1 + + manifest: + needs: docker-ros + runs-on: ubuntu-latest + steps: + - name: Slugify ref name + id: slugify-ref-name + uses: gacts/github-slug@v1 + with: + to-slug: ${{ github.head_ref || github.ref_name }} + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Docker buildx + uses: docker/setup-buildx-action@v3 + - name: Install regctl + uses: regclient/actions/regctl-installer@main + - name: Push multi-arch manifests and clean up architecture tags + shell: bash + env: + IMAGE_NAME: ghcr.io/${{ github.repository }} + IMAGE_TAG: ${{ github.ref_type == 'tag' && github.ref_name || 'latest' }} + # Match docker-ros's suffix for PRs and non-default branches. + IMAGE_POSTFIX: ${{ github.ref_type != 'tag' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && format('_{0}_ci', steps.slugify-ref-name.outputs.slug) || '' }} + run: | + for suffix in '' '-dev' '-slim'; do + image="${IMAGE_NAME,,}:${IMAGE_TAG}${suffix}${IMAGE_POSTFIX}" + docker buildx imagetools create --tag "$image" "${image}-amd64" "${image}-arm64" + # Remove tags while preserving the manifests referenced by the multi-arch image. + regctl tag rm "${image}-amd64" + regctl tag rm "${image}-arm64" + done diff --git a/.openads-dev-environment b/.openads-dev-environment index 9bac0f2..c54559c 160000 --- a/.openads-dev-environment +++ b/.openads-dev-environment @@ -1 +1 @@ -Subproject commit 9bac0f23d32a395437b7f42c360fd706e95b5db9 +Subproject commit c54559ce039c7ad14339261f8cae113942c4ff38 diff --git a/deployment/helm/Chart.yaml b/deployment/helm/Chart.yaml index ab37866..6ad16b6 100644 --- a/deployment/helm/Chart.yaml +++ b/deployment/helm/Chart.yaml @@ -6,4 +6,4 @@ description: Monitoring launch package dependencies: - repository: oci://ghcr.io/openads-project/openads-helm name: openadservice - version: 1.2.0 + version: 1.3.0 From 3a1210a6ba82738ce5ac9ac14d71391d71a89310 Mon Sep 17 00:00:00 2001 From: Lukas Ostendorf Date: Fri, 27 Nov 2026 16:03:13 +0100 Subject: [PATCH 2/3] Update docker-ros workflow to use preinstalled runtimes and upgrade actions to v4 --- .github/workflows/docker-ros.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-ros.yml b/.github/workflows/docker-ros.yml index fac668f..6bb40ae 100644 --- a/.github/workflows/docker-ros.yml +++ b/.github/workflows/docker-ros.yml @@ -36,7 +36,7 @@ jobs: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: - tool-cache: true + preinstalled-runtimes: true - uses: ika-rwth-aachen/docker-ros@main with: platform: ${{ matrix.platform }} @@ -62,13 +62,13 @@ jobs: with: to-slug: ${{ github.head_ref || github.ref_name }} - name: Login to GHCR - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Install regctl uses: regclient/actions/regctl-installer@main - name: Push multi-arch manifests and clean up architecture tags From 624d5a60dd6da1465c02351c242a0cabd7515d50 Mon Sep 17 00:00:00 2001 From: Lukas Ostendorf Date: Fri, 27 Nov 2026 16:53:16 +0100 Subject: [PATCH 3/3] Refactor docker-ros workflow to remove regctl installation and clean up architecture tags --- .github/workflows/docker-ros.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-ros.yml b/.github/workflows/docker-ros.yml index 6bb40ae..a5cd5ed 100644 --- a/.github/workflows/docker-ros.yml +++ b/.github/workflows/docker-ros.yml @@ -69,9 +69,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker buildx uses: docker/setup-buildx-action@v4 - - name: Install regctl - uses: regclient/actions/regctl-installer@main - - name: Push multi-arch manifests and clean up architecture tags + - name: Push multi-arch manifests shell: bash env: IMAGE_NAME: ghcr.io/${{ github.repository }} @@ -82,7 +80,4 @@ jobs: for suffix in '' '-dev' '-slim'; do image="${IMAGE_NAME,,}:${IMAGE_TAG}${suffix}${IMAGE_POSTFIX}" docker buildx imagetools create --tag "$image" "${image}-amd64" "${image}-arm64" - # Remove tags while preserving the manifests referenced by the multi-arch image. - regctl tag rm "${image}-amd64" - regctl tag rm "${image}-arm64" - done + done \ No newline at end of file