Closed andy5995 closed 4 months ago
I see now I didn't include all the steps https://docs.docker.com/build/ci/github-actions/multi-platform/ I'll try that and close the issue after successful completion.
After adding the required sections, it's working now.
I did have several failures though even after following all the docs, but I opened a ticket for it on the docs repo:
@andy5995 Hi friend! I got the same issue. Could you please have a look at my code? Thanks so much!
I don't use the outputs
param. Maybe there is something wrong here:
- name: Build and push Docker image
id: build-push
uses: docker/build-push-action@v5
with:
context: ./docker/${{ matrix.image }}
file: ./docker/${{ matrix.image }}/Dockerfile
push: ${{ github.event_name != 'pull_request' }}. # only push when releasd
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ matrix.platform }}
build-args: |
PLATFORM=${{ matrix.platform }}
Contributing guidelines
I've found a bug, and:
Description
When I specify platforms in a matrix in a GitHub workflow, and use the variable in the "platforms" field, each time a job in the matrix completes and an image is pushed, the previous one for a different architecture is erased from the repo in Docker Hub
Expected behaviour
The images shouldn't get erased, but added to the repo.
Actual behaviour
Described in description
Repository URL
https://github.com/andy5995/linuxdeploy-build-helper
Workflow run URL
https://github.com/andy5995/linuxdeploy-build-helper/actions/runs/7814118868
YAML workflow
Workflow logs
logs_79.zip
BuildKit logs
No response
Additional info
I've previously inquired about this in the Docker support forum and here on the Discussions.
Here you can see there is no drop-down box for each arch I tried building, only an image for linux/arm/v7 the last job in the matrix to complete: