diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 28e3c1a039f..f2081951a4d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -82,6 +82,7 @@ jobs: tags: | vesoft/nebula-graphd:nightly target: graphd + cache-to: type=local,dest=/tmp/buildx-cache,mode=max push: true - uses: docker/build-push-action@v2 with: @@ -91,6 +92,7 @@ jobs: tags: | vesoft/nebula-storaged:nightly target: storaged + cache-from: type=local,src=/tmp/buildx-cache push: true - uses: docker/build-push-action@v2 with: @@ -100,6 +102,7 @@ jobs: tags: | vesoft/nebula-metad:nightly target: metad + cache-from: type=local,src=/tmp/buildx-cache push: true - uses: docker/build-push-action@v2 with: @@ -109,7 +112,11 @@ jobs: tags: | vesoft/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 coverage: name: coverage diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index 48014a99182..283af2ffb02 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -117,6 +117,7 @@ jobs: ${{ secrets.HARBOR_REGISTRY }}/vesoft/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 }} @@ -133,6 +134,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 }} @@ -148,6 +150,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 }} @@ -163,9 +166,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 test: name: test needs: package