From 932342f84ff2c0ec3628f74d0680742b5a8ed33b Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Sun, 21 May 2023 17:12:29 +0800 Subject: [PATCH] ci: cache dependencies. --- .gitea/workflows/built-bin.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/built-bin.yaml b/.gitea/workflows/built-bin.yaml index 36cd2d5..850a97c 100644 --- a/.gitea/workflows/built-bin.yaml +++ b/.gitea/workflows/built-bin.yaml @@ -5,6 +5,17 @@ jobs: build: runs-on: ubuntu-latest steps: + - name: Restore Dependencies + id: restore-dependencies + uses: https://github.com/actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo - name: Check out repository code uses: actions/checkout@v3 @@ -30,7 +41,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo + key: ${{ steps.restore-dependencies.outputs.cache-primarily-key }} - name: Cache Executable Binary uses: https://github.com/actions/cache@v3