Skip to content

Enable ARM64 build - #20

Open
lostendo wants to merge 3 commits into
mainfrom
arm64
Open

lostendo wants to merge 3 commits into
mainfrom
arm64

Conversation

@lostendo

@lostendo lostendo commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Build development and runtime images in parallel on native amd64 and arm64 runners. After successful builds, publish multi-architecture manifests for runtime, development, and slim images, then remove temporary architecture tags while preserving the referenced manifests.

Preserve release and PR tag naming, and serialize runs per ref to prevent tag conflicts. Update the manifest job’s Docker actions and rename the deprecated disk-cleanup input.

Also update the dev-environment submodule and regenerate the Helm chart, bumping openadservice to 1.3.0.

Comment on lines +14 to +21
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does that come from, or why do we need it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

permissions explicitly allows the token to read repository contents and publish packages. The new manifest job uses GITHUB_TOKEN to push to GHCR, which requires packages: write. Whether this was already granted implicitly depends on repository settings. GitHub docs

concurrency prevents overlapping runs for the same ref from overwriting architecture tags during manifest assembly. Otherwise, a manifest could combine AMD64 from one commit with ARM64 from another. cancel-in-progress: false lets the active build finish. GitHub docs

Comment thread .github/workflows/docker-ros.yml Resolved
Comment thread .github/workflows/docker-ros.yml Resolved
Comment on lines +55 to +83
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@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v4
- name: Push multi-arch manifests
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"
done No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me like this could be integrated quite easily into docker-ros. That would probably be cleaner than copying this block everywhere. Alternatively, we could stick it in the dev-environment, but for now I'd lean toward trying it in docker-ros.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we'll probably only need the last step here, because the remaining steps are already happening in docker-ros anyway.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These steps already run inside docker-ros, but in the matrix build jobs. The manifest job runs on a fresh runner, so it needs its own registry login and tooling, plus the branch suffix to find the correct tags. We could potentially use the runner’s preinstalled buildx, but otherwise we need these steps with the current setup.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants