Skip to content

[ANCHOR-1190] Fix Docker release to publish multi-arch images #1922

Merged
JiahuiWho merged 2 commits intodevelopfrom
fix-multi-arch-docker-release
Apr 10, 2026
Merged

[ANCHOR-1190] Fix Docker release to publish multi-arch images #1922
JiahuiWho merged 2 commits intodevelopfrom
fix-multi-arch-docker-release

Conversation

@JiahuiWho
Copy link
Copy Markdown
Contributor

@JiahuiWho JiahuiWho commented Apr 9, 2026

Description

Each release job now pushes to a temporary arch-specific tag (-amd64, -arm64), and a new create_multi_arch_manifest job combines them into a single multi-arch manifest.

Same for on_push_to_develop

Context

Since 4.1.1, the release workflow has been publishing only one architecture per release due to a race condition, the amd64 and arm64 jobs both push to the same Docker tag, so whichever finishes last overwrites the other.

Testing

  • ./gradlew test

Documentation

N/A

Known limitations

N/A

@JiahuiWho JiahuiWho marked this pull request as ready for review April 9, 2026 23:51
Copilot AI review requested due to automatic review settings April 9, 2026 23:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the Docker release workflow so it consistently publishes a multi-architecture image by avoiding tag overwrite races between amd64 and arm64 builds.

Changes:

  • Push amd64 and arm64 builds to temporary architecture-specific tags (-amd64, -arm64) instead of the shared release tag.
  • Add a create_multi_arch_manifest job to publish multi-arch manifests for both the version tag and latest.
  • Update the complete job to include the new manifest job in its dependency chain.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JiahuiWho JiahuiWho force-pushed the fix-multi-arch-docker-release branch from 7d77ad5 to 5b4b463 Compare April 10, 2026 00:02
@@ -51,7 +51,7 @@ jobs:
build-args: |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The CodeQL alert on both files is correct. We should probably limit permissions by adding the following after on: and before jobs:

  permissions:
    contents: read

@JiahuiWho JiahuiWho merged commit 408cb52 into develop Apr 10, 2026
11 checks passed
@JiahuiWho JiahuiWho deleted the fix-multi-arch-docker-release branch April 10, 2026 13:58
JiahuiWho added a commit that referenced this pull request Apr 10, 2026
### Description

  - Switch to Docker's recommended pattern: 
- Build jobs push by digest only (no intermediate -amd64 -arm64 tags)
- Then a `create_multi_arch_manifest` job uses `docker buildx imagetools
create` to merge both digests into a single multi-arch manifest.
  - Apply the same fix to `on_push_to_develop`

### Context

#1922 failed because
`docker manifest create` (used to merge the amd64 and arm64 builds)
expects each source image to be a plain image manifest. However,
`build-push-action` v6 with buildx wraps each single-platform image into
a manifest list (containing the image + provenance attestation), so the
command rejects them with the error "is a manifest list"

### Testing

- `./gradlew test`

### Documentation

N/A

### Known limitations

N/A
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.

3 participants