Przeglądaj źródła

ci(searcher): fix build cache issue

iwanhae 1 rok temu
rodzic
commit
9e7762717a
1 zmienionych plików z 13 dodań i 2 usunięć
  1. 13 2
      .github/workflows/build_docker_parser.yaml

+ 13 - 2
.github/workflows/build_docker_parser.yaml

@@ -43,7 +43,19 @@ jobs:
             type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
             type=semver,pattern={{version}}
 
-      - name: Build and push Docker image
+      - name: Build and push Docker Builder image
+        id: build-and-push-cache
+        uses: docker/build-push-action@v4.1.1
+        with:
+          context: ./searcher
+          push: false
+          tags: ${{ steps.meta.outputs.tags }}
+          labels: ${{ steps.meta.outputs.labels }}
+          target: builder
+          cache-from: type=gha
+          cache-to: type=gha,mode=max
+
+      - name: Build and push Docker Main image
         id: build-and-push
         uses: docker/build-push-action@v4.1.1
         with:
@@ -52,4 +64,3 @@ jobs:
           tags: ${{ steps.meta.outputs.tags }}
           labels: ${{ steps.meta.outputs.labels }}
           cache-from: type=gha
-          cache-to: type=gha,mode=max