From 40695c84e3b2ed04a47b921a81d823e37a5329b9 Mon Sep 17 00:00:00 2001 From: Northword <44738481+northword@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:10:37 +0800 Subject: [PATCH] Try to fix commit hash cache --- .github/workflows/ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d74308e..0e6329c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,23 +19,26 @@ jobs: with: repository: "zotero/zotero-android" + - name: Check for New Commits + run: | + latest_commit=$(git rev-parse HEAD) + echo "Latest commit: $latest_commit" + echo "$latest_commit" > ./latest_commit + + short_commit=${latest_commit::7} + echo "short_commit: $short_commit" + - name: Cache last commit hash id: cache-hash uses: actions/cache@v3 with: path: last_commit key: zotero-android-commit-hash - restore-keys: zotero-android-commit-hash + restore-keys: zotero-android-commit-hash-${{ latest_commit }} - name: Check for New Commits id: check-commit run: | - latest_commit=$(git rev-parse HEAD) - echo "Latest commit: $latest_commit" - - short_commit=${latest_commit::7} - echo "short_commit: $short_commit" - echo "Last commit from cache:" cat last_commit