From e2c3d18d63c2cecc6abb2082d7dc9cb0c323008c Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Sun, 21 May 2023 16:56:55 +0800 Subject: [PATCH] ci: cache dependencies. --- .gitea/workflows/built-bin.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/built-bin.yaml b/.gitea/workflows/built-bin.yaml index f9a1dcd..04b81e9 100644 --- a/.gitea/workflows/built-bin.yaml +++ b/.gitea/workflows/built-bin.yaml @@ -21,11 +21,17 @@ jobs: - name: Build run: cargo build --release + - name: Cache Dependencies + uses: https://github.com/actions/cache@v3 + with: + path: ./target + key: ${{ runner.os }}-release-${{ hashFiles('**/Cargo.lock') }} + - name: Cache Executable Binary uses: https://github.com/actions/cache@v3 with: path: ./target/release/network-monitor - key: ${{ runner.os }}-release-${{ steps.tag.outputs.tag}} + key: ${{ runner.os }}-release-${{ steps.tag.outputs.tag }} docker: runs-on: ubuntu-latest