refactor: simplify api-v1-production-build cache key for durability (#26365)

* feat: add cache-api-v1-build-key action for durable caching

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* refactor: simplify cache key inline instead of separate action

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Keith Williams
2026-01-01 14:22:03 +00:00
committed by GitHub
co-authored by keith@cal.com <keithwillcode@gmail.com> keith@cal.com <keithwillcode@gmail.com> Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 128d15ea8f
commit 50675593fa
@@ -75,15 +75,12 @@ jobs:
cache-name: api-v1-build
key-1: ${{ hashFiles('yarn.lock') }}
key-2: ${{ hashFiles('apps/api/v1/**.[jt]s', 'apps/api/v1/**.[jt]sx', '!**/node_modules') }}
key-3: ${{ github.event.pull_request.number || github.ref }}
# Ensures production-build.yml will always be fresh
key-4: ${{ github.sha }}
with:
path: |
${{ github.workspace }}/apps/api/v1/.next
**/.turbo/**
**/dist/**
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ env.key-4 }}
key: ${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}
- name: Log Cache Hit
if: steps.cache-api-v1-build.outputs.cache-hit == 'true'
run: echo "Cache hit for API v1 build. Skipping build."