This fixes cache propagation delay issues with Blacksmith's distributed cache. The previous implementation used separate save/restore actions with fail-on-cache-miss: true, which failed when the cache wasn't immediately available after being saved by the Prepare job. The new implementation uses actions/cache@v4 (combined save/restore) with a fallback to do the checkout if cache miss, matching the pattern used by cache-build and cache-db which don't have this issue. Changes: - Refactored cache-checkout action to use actions/cache@v4 - Added fallback checkout step when cache miss occurs - Removed mode input (no longer needed) - Updated all workflows to use the simplified cache-checkout action Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
name: Atoms production Build
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Atoms
|
|
permissions:
|
|
contents: read
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
sparse-checkout: .github
|
|
- uses: ./.github/actions/cache-checkout
|
|
- uses: ./.github/actions/yarn-install
|
|
- name: Cache atoms production build
|
|
uses: actions/cache@v4
|
|
id: cache-atoms-build
|
|
env:
|
|
cache-name: atoms-build
|
|
key-1: ${{ hashFiles('yarn.lock') }}
|
|
key-2: ${{ hashFiles('packages/platform/atoms/**.[jt]s', 'packages/platform/atoms/**.[jt]sx', 'packages/platform/atoms/package.json', '!**/node_modules') }}
|
|
with:
|
|
path: |
|
|
**/dist/**
|
|
key: ${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}
|
|
- name: Run build
|
|
if: steps.cache-atoms-build.outputs.cache-hit != 'true'
|
|
run: |
|
|
export NODE_OPTIONS="--max_old_space_size=8192"
|
|
rm -rf packages/platform/atoms/node_modules
|
|
yarn install
|
|
yarn workspace @calcom/atoms run build-npm
|
|
shell: bash
|