From 18b11b811f4558329790633c3d8335ed63b9a7e2 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Fri, 11 Oct 2024 10:18:02 -0400 Subject: [PATCH] Split build and push --- .github/workflows/docker.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bff7482..c41b438 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -38,13 +38,19 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push Docker image - id: build-and-push + - name: Build Docker image uses: docker/build-push-action@v4 with: context: . - push: ${{ github.event_name != 'pull_request' }} + load: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=registry,ref=${{ fromJSON(steps.meta.outputs.json).tags[0] }} cache-to: inline + + - name: Push Docker image + uses: docker/build-push-action@v4 + if: ${{ github.event_name != 'pull_request' }} + with: + push: true + tags: ${{ steps.meta.outputs.tags }}