Skip to content

Commit 1313d4a

Browse files
pirateclaude
andcommitted
CI: cache mining API + bare-clone data across runs
Adds actions/cache@v4 with per-user keys. Restores the most recent cache via restore-keys prefix match; saves a fresh cache each run. Cuts down on duplicate GH API calls (rate-limited 5000/hr) and re-clones for the same repos run-to-run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d2a7959 commit 1313d4a

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/mine-and-deploy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,23 @@ jobs:
3838
with:
3939
node-version: "24"
4040

41+
# Persist per-user mining caches across runs so we don't re-fetch
42+
# PR details, commit stats, etc. that we've already pulled before.
43+
# Key includes the inputs.user (or 'full' for cron runs) so single-
44+
# user dispatches restore that user's cache specifically.
45+
- name: Restore mining caches
46+
uses: actions/cache@v4
47+
with:
48+
path: |
49+
cache_*/api/
50+
cache_*/bare/
51+
cache/api/
52+
cache/bare/
53+
key: stats-cache-v1-${{ inputs.user || 'full' }}-${{ github.run_id }}
54+
restore-keys: |
55+
stats-cache-v1-${{ inputs.user || 'full' }}-
56+
stats-cache-v1-
57+
4158
- name: Install gh CLI
4259
run: |
4360
type -p gh >/dev/null || (

0 commit comments

Comments
 (0)