Skip to content

Commit

Permalink
Fix push in docker workflow (#4063)
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs authored Mar 15, 2024
1 parent 36c3514 commit d0b490e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit d0b490e

Please sign in to comment.