Skip to content

Commit

Permalink
Try to fix commit hash cache
Browse files Browse the repository at this point in the history
  • Loading branch information
northword authored Aug 12, 2024
1 parent 64f5860 commit 40695c8
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40695c8

Please sign in to comment.