From 3e0fb208e2d118164a913a1f70678a8fa75abffd Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Sun, 29 Dec 2024 11:37:11 +0100 Subject: [PATCH] Fix stage name and add additional stage --- .github/workflows/build.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da0ec57..98a1caf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,14 +25,24 @@ jobs: username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }} password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }} - - name: Build and push intermediate stages + - name: Build and push intermediate stages (deps) uses: docker/build-push-action@v6 with: context: . - target: build + target: deps push: ${{ github.event_name != 'pull_request' }} - tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build - cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build + tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:deps + cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:deps + cache-to: type=inline + + - name: Build and push intermediate stages (builder) + uses: docker/build-push-action@v6 + with: + context: . + target: builder + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:builder + cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:builder cache-to: type=inline - name: Build and push