fix(ci): support manifest changes without lockfile

This commit is contained in:
dotta
2026-04-06 21:58:29 -05:00
parent 669e5c87cc
commit 2c8cb7f519
+16 -2
View File
@@ -109,7 +109,14 @@ jobs:
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: |
changed="$(git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.event.pull_request.head.sha }}")"
manifest_pattern='(^|/)package\.json$|^pnpm-workspace\.yaml$|^\.npmrc$|^pnpmfile\.(cjs|js|mjs)$'
if printf '%s\n' "$changed" | grep -Eq "$manifest_pattern"; then
pnpm install --no-frozen-lockfile
else
pnpm install --frozen-lockfile
fi
- name: Typecheck
run: pnpm -r typecheck
@@ -147,7 +154,14 @@ jobs:
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: |
changed="$(git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.event.pull_request.head.sha }}")"
manifest_pattern='(^|/)package\.json$|^pnpm-workspace\.yaml$|^\.npmrc$|^pnpmfile\.(cjs|js|mjs)$'
if printf '%s\n' "$changed" | grep -Eq "$manifest_pattern"; then
pnpm install --no-frozen-lockfile
else
pnpm install --frozen-lockfile
fi
- name: Build
run: pnpm build