From 702b9d95968cf6d422181b2e850b86d7afc6f16a Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 31 Dec 2023 16:53:10 +0800 Subject: [PATCH] CI: use date as cache key --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c4c10d40..8f8654b8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,12 +18,15 @@ jobs: - uses: oven-sh/setup-bun@v1 with: bun-version: canary + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT - name: Cache cache.db uses: actions/cache@v3 with: path: | .cache - key: ${{ runner.os }}-v1-${{ github.sha }} + key: ${{ runner.os }}-v1-${{ steps.date.outputs.date }} # If source files changed but packages didn't, rebuild from a prior cache. restore-keys: | ${{ runner.os }}-v1