Skip to content
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

Fix builds by switching to native arm64 runners #21

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

lhoBas
Copy link
Contributor

@lhoBas lhoBas commented Jan 23, 2025

Enjoyed tinkering around with the GitHub Action so decided to take a stab at fixing #20 myself (with help from Copilot through Cline, to be fair)

@lhoBas lhoBas force-pushed the fix/native-runners branch from cc08e4e to cb11aae Compare January 23, 2025 20:20
@lhoBas lhoBas force-pushed the fix/native-runners branch from cb11aae to 8893e86 Compare January 23, 2025 20:25
@moritzheiber
Copy link
Owner

So the main challenge for this is (and the also the reason I haven't had a chance to try it yet): you need to build the images on different runners (because of the diverging architectures), but then "unify" them in at a later stage to push a proper multi-arch image instead of individual images (otherwise you're overwriting the image tag with just a single architecture, and not even deterministically, but rather the latest job that finishes snatches the tag). I don't believe this PR "solves" this challenge (yet)

@lhoBas
Copy link
Contributor Author

lhoBas commented Jan 23, 2025

Ah, I see - I'll push a manifest merge along the lines of docker/build-push-action#671 (comment) tomorrow 👌

@lhoBas
Copy link
Contributor Author

lhoBas commented Jan 24, 2025

This now handles creating a clean multiarch image for each image/version combo. Don't love how the manifest sha's are being passed across the steps, but apparently matrix output gathering is not very mature in GitHub Actions yet. No 'intermediary' tags are pushed to the GitHub Packages entry with this approach (example)

@moritzheiber moritzheiber merged commit 81fd1ad into moritzheiber:main Jan 24, 2025
26 checks passed
@moritzheiber
Copy link
Owner

I think this looks good enough, thank you!

@lhoBas lhoBas deleted the fix/native-runners branch January 24, 2025 10:33
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