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

Rework build_and_publish.yaml to handle docker images #951

Merged
merged 1 commit into from
Oct 19, 2024
Merged

Conversation

mem
Copy link
Contributor

@mem mem commented Oct 19, 2024

Set up the global git config to disable ownership validation, this is causing more grief than necesary and in this particular use case it doesn't really provide anything. This is possibly a bug in actions/checkout.

Tear shared-workflows/build-push-to-dockerhub appart and replace it with a couple of steps (setup-buildx, build-push-action) in a way that the image created in the buildx context is exported to a tar file, so that we can reuse it in a different job to assemble a single multiarch image together.

Add some intermediate steps that capture the result of building the images and uploads them as build artifacts, so that we can download them in a different job where the actual image is created.

Finally, put the images together and push them to GAR. This requires reworking the dockerfiles in a way that they don't execute any platform dependent steps, and everything can be done in the host.

Something broke with the chromium package, so I had to unpin it.

@mem mem requested a review from a team as a code owner October 19, 2024 00:34
@mem mem force-pushed the mem/push-to-gar branch from e4019f5 to ed4d2e3 Compare October 19, 2024 00:44
Set up the global git config to disable ownership validation, this is
causing more grief than necesary and in this particular use case it
doesn't really provide anything. This is possibly a bug in
actions/checkout.

Tear shared-workflows/build-push-to-dockerhub appart and replace it with
a couple of steps (setup-buildx, build-push-action) in a way that the
image created in the buildx context is exported to a tar file, so that
we can reuse it in a different job to assemble a single multiarch image
together.

Add some intermediate steps that capture the result of building the
images and uploads them as build artifacts, so that we can download them
in a different job where the actual image is created.

Finally, put the images together and push them to GAR. This requires
reworking the dockerfiles in a way that they don't execute any platform
dependent steps, and everything can be done in the host.

Something broke with the chromium package, so I had to unpin it.

Signed-off-by: Marcelo E. Magallon <[email protected]>
@mem mem force-pushed the mem/push-to-gar branch from ed4d2e3 to e3321a8 Compare October 19, 2024 00:50
@mem mem merged commit 7189a16 into main Oct 19, 2024
5 checks passed
@mem mem deleted the mem/push-to-gar branch October 19, 2024 01:00
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.

1 participant