diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 53574fac717..c62dca39ea2 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -86,6 +86,7 @@ jobs: tags: | ${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-graphd:nightly target: graphd + cache-to: type=local,dest=/tmp/buildx-cache,mode=max push: true - uses: docker/build-push-action@v2 with: @@ -95,6 +96,7 @@ jobs: tags: | ${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-storaged:nightly target: storaged + cache-from: type=local,src=/tmp/buildx-cache push: true - uses: docker/build-push-action@v2 with: @@ -104,6 +106,7 @@ jobs: tags: | ${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-metad:nightly target: metad + cache-from: type=local,src=/tmp/buildx-cache push: true - uses: docker/build-push-action@v2 with: @@ -113,4 +116,8 @@ jobs: tags: | ${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-tools:nightly target: tools + cache-from: type=local,src=/tmp/buildx-cache push: true + - name: delete the cache + run: | + rm -rf /tmp/buildx-cache diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index 1efb2c136c0..28b7742ca80 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -120,6 +120,7 @@ jobs: ${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-graphd:${{ steps.tagname.outputs.majorver }} ${{ steps.docker.outputs.graphdTag }} target: graphd + cache-to: type=local,dest=/tmp/buildx-cache,mode=max push: true build-args: | BRANCH=${{ steps.tagname.outputs.tag }} @@ -136,6 +137,7 @@ jobs: ${{ steps.docker.outputs.storagedTag }} target: storaged push: true + cache-from: type=local,src=/tmp/buildx-cache build-args: | BRANCH=${{ steps.tagname.outputs.tag }} VERSION=${{ steps.tagname.outputs.tagnum }} @@ -152,6 +154,7 @@ jobs: ${{ steps.docker.outputs.metadTag }} target: metad push: true + cache-from: type=local,src=/tmp/buildx-cache build-args: | BRANCH=${{ steps.tagname.outputs.tag }} VERSION=${{ steps.tagname.outputs.tagnum }} @@ -167,9 +170,13 @@ jobs: ${{ steps.docker.outputs.toolsTag }} target: tools push: true + cache-from: type=local,src=/tmp/buildx-cache build-args: | BRANCH=${{ steps.tagname.outputs.tag }} VERSION=${{ steps.tagname.outputs.tagnum }} + - name: delete the cache + run: | + rm -rf /tmp/buildx-cache docker_build-standalone: needs: package