From cbbc8cad847c2cbc057268ad8bac666eae256422 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 14 Feb 2024 15:11:57 -0700 Subject: [PATCH] Try and make collab deploys faster (#7746) Use github machines and build on host instead of in container Release Notes: - N/A --- .github/workflows/deploy_collab.yml | 6 +++--- Dockerfile | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy_collab.yml b/.github/workflows/deploy_collab.yml index 953e4f1190..eca43501d4 100644 --- a/.github/workflows/deploy_collab.yml +++ b/.github/workflows/deploy_collab.yml @@ -63,9 +63,6 @@ jobs: - name: Sign into DigitalOcean docker registry run: doctl registry login - - name: Prune Docker system - run: docker system prune --filter 'until=720h' -f - - name: Checkout repo uses: actions/checkout@v4 with: @@ -78,6 +75,9 @@ jobs: - name: Publish docker image run: docker push registry.digitalocean.com/zed/collab:${GITHUB_SHA} + - name: Prune Docker system + run: docker system prune --filter 'until=72h' -f + deploy: name: Deploy new server image needs: diff --git a/Dockerfile b/Dockerfile index 55ab7fe67b..704a00adb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ ARG GITHUB_SHA ENV GITHUB_SHA=$GITHUB_SHA RUN --mount=type=cache,target=./script/node_modules \ --mount=type=cache,target=/usr/local/cargo/registry \ + --mount=type=cache,target=/usr/local/cargo/git \ --mount=type=cache,target=./target \ cargo build --release --package collab --bin collab