-
-
Notifications
You must be signed in to change notification settings - Fork 521
ci: merge images #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: merge images #297
Conversation
Reviewer's GuideThis PR refactors and extends the Docker publish workflow to support standardized YAML formatting, multi-architecture builds, per-arch digest export/upload, and a new merge job that consolidates image digests into universal manifests for both GHCR and Docker Hub. Sequence Diagram: Multi-Arch Docker Image Build and Manifest MergesequenceDiagram
title Sequence Diagram: Multi-Arch Docker Image Build and Manifest Merge
actor User
participant GA as GitHub Actions
participant Build_amd64 as "Build Job (linux/amd64)"
participant Build_arm64 as "Build Job (linux/arm64)"
participant Artifacts as "GitHub Artifacts"
participant Merge as "Merge Job"
participant GHCR
participant DockerHub
User->>GA: Event (Push, Tag, Workflow Dispatch)
GA->>Build_amd64: Start Build (amd64)
GA->>Build_arm64: Start Build (arm64)
par
Build_amd64->>Build_amd64: Checkout, Setup Buildx
Build_amd64->>GHCR: Login (if not PR)
Build_amd64->>DockerHub: Login (if not PR)
Build_amd64->>Build_amd64: Build image (amd64)
Build_amd64-->>GHCR: Push amd64 image & manifest
Build_amd64-->>DockerHub: Push amd64 image & manifest
note right of Build_amd64: Get digest of pushed amd64 manifest
Build_amd64->>Artifacts: Upload amd64 digest
and
Build_arm64->>Build_arm64: Checkout, Setup Buildx
Build_arm64->>GHCR: Login (if not PR)
Build_arm64->>DockerHub: Login (if not PR)
Build_arm64->>Build_arm64: Build image (arm64)
Build_arm64-->>GHCR: Push arm64 image & manifest
Build_arm64-->>DockerHub: Push arm64 image & manifest
note right of Build_arm64: Get digest of pushed arm64 manifest
Build_arm64->>Artifacts: Upload arm64 digest
end
alt If not Pull Request AND Build Jobs Successful
GA->>Merge: Start Merge Job
Merge->>Artifacts: Download all digests
Merge->>GHCR: Login
Merge->>GHCR: Create & Push Manifest List (using digests)
Merge->>DockerHub: Login
Merge->>DockerHub: Create & Push Manifest List (using digests)
Merge->>Merge: Inspect final images (optional)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @C4illin - I've reviewed your changes - here's some feedback:
- Add an explicit
id:to thedocker/build-push-action@v6step so you can reliably reference itsdigestoutput in subsequent steps. - Remove or re-enable the commented-out
push:line under the build step to ensure images get pushed when not in a PR workflow. - Update the prepare‐step comment to match the actual environment variable (
PLATFORM_PAIR) you’re setting (it currently refers toPLATFORMS_PAIR).
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Super. Will update when I go home and test calibre |
Summary by Sourcery
Enhance the Docker CI workflow to support multi-architecture builds and automated manifest list merging for both GitHub Container Registry and Docker Hub.
New Features:
Enhancements:
CI: