From d0b490e7889157c668c1e3f4f96416fb093cf1c9 Mon Sep 17 00:00:00 2001 From: Hubert Date: Fri, 15 Mar 2024 13:56:56 +0100 Subject: [PATCH] Fix `push` in docker workflow (#4063) --- .github/workflows/docker.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 17fdbaf2d00..24a716a597b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -85,6 +85,17 @@ jobs: # Compile Docker image only for AMD64 for a regular PR to save some CI time. platforms: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && 'linux/amd64,linux/arm64' || 'linux/amd64' }} target: fat-image + + # Redo the previous step, but load the image locally. This is a cheap operation, as all the layers are cached. + - name: Load fat image to local Docker + uses: docker/build-push-action@v5 + with: + context: . + tags: ${{ steps.metafat.outputs.tags }} + labels: ${{ steps.metafat.outputs.labels }} + # Compile Docker image only for AMD64 for a regular PR to save some CI time. + platforms: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + target: fat-image load: true # Listing Docker images makes only sense if the `load` option is set to `true` in the `build-push-action`.