From cf1c43301575de854c57e07a7884fb4d2111d678 Mon Sep 17 00:00:00 2001 From: HarrisChu <1726587+HarrisChu@users.noreply.github.com> Date: Fri, 17 Jun 2022 14:04:37 +0800 Subject: [PATCH] force cache the docker layer --- .github/workflows/nightly.yml | 7 +++++++ .github/workflows/rc.yml | 7 +++++++ 2 files changed, 14 insertions(+) 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