-
I am trying to follow the guide to build a multi-platform image in parallel. What's different about my setup than the guide is that I want to first build the image, then run integration tests on it, and then push the image to the registry (if the tests succeed). I don't really know much about how buildx works, but the way I understand it is that to create a multi-platform image in parallel, I have to run one job for each platform in parallel where it builds the image and pushes it to the registry using a “push by digest”. My understanding is that this pushes the image without creating/updating an image tag in the repository; the image can be accessed and downloaded as My understanding is that after all platform images have been built and pushed, I have to run another job where it creates a manifest that references all the digests of the different platforms, and then push this manifest as a new tag of the image. Since I have not been able to find a way to first build the image locally, then run the integration tests, and then “push by digest” the image (related discussion: docker/buildx#2718; I have also not found a way to “push by digest” using a regular Where I am getting stuck now is that in the step where I build and push by digest the image, I also need to store my image locally in order to use it in the integration tests. You can find my full configuration here (only the -
name: Build and push docker image
id: build
uses: docker/build-push-action@v5
with:
context: .
labels: ${{ steps.meta.outputs.labels }}
outputs: |
type=image,"name=facilmap/facilmap",push-by-digest=true,name-canonical=true,push=true
type=docker,name=facilmap-ci I am trying to both push by digest the image to the This looks to me like trying to create the two outputs at once does not work in this case. What could be the reason for this? What could be a workaround (that does not involve downloading the image back from the repository)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
During investigation, I switched the two outputs, so that the |
Beta Was this translation helpful? Give feedback.
During investigation, I switched the two outputs, so that the
type=docker
comes before thetype=image
. For some reason this has solved the problem.