fix(ci): use corepack instead of pnpm/action-setup
ci / typecheck (map[dir:services/platform-api name:platform-api]) (push) Has been cancelled
ci / test (push) Has been cancelled
ci / typecheck (map[dir:apps/website name:website]) (push) Has been cancelled
ci / typecheck (map[dir:apps/booking name:booking]) (push) Has been cancelled
ci / typecheck (map[dir:apps/portal name:portal]) (push) Has been cancelled
ci / typecheck (map[dir:services/platform-api name:platform-api]) (push) Has been cancelled
ci / test (push) Has been cancelled
ci / typecheck (map[dir:apps/website name:website]) (push) Has been cancelled
ci / typecheck (map[dir:apps/booking name:booking]) (push) Has been cancelled
ci / typecheck (map[dir:apps/portal name:portal]) (push) Has been cancelled
pnpm/action-setup@v4 ran at the repo root (uses: steps ignore defaults.run.working-directory) where there is no package.json, so it couldn't read the pnpm version → "No pnpm version specified". Use corepack (bundled with node) in the install step, which reads each app's own packageManager — matching the Dockerfiles. Verified in the runner's container: corepack enable + frozen install succeeds for every app.
This commit is contained in:
+9
-12
@@ -25,19 +25,17 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# `uses:` steps ignore defaults.run.working-directory, so action-setup runs
|
||||
# at the repo root — which has no package.json (per-app monorepo). Pin the
|
||||
# version explicitly instead of reading packageManager.
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
# Use corepack (bundled with node) instead of pnpm/action-setup: it reads
|
||||
# each app's packageManager from its own package.json, which is what this
|
||||
# per-app monorepo (no root package.json) needs.
|
||||
- name: Install
|
||||
run: pnpm install --frozen-lockfile
|
||||
run: |
|
||||
corepack enable
|
||||
pnpm install --frozen-lockfile
|
||||
|
||||
- name: Typecheck
|
||||
run: pnpm typecheck
|
||||
@@ -49,13 +47,12 @@ jobs:
|
||||
working-directory: services/platform-api
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- name: Install
|
||||
run: pnpm install --frozen-lockfile
|
||||
run: |
|
||||
corepack enable
|
||||
pnpm install --frozen-lockfile
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
|
||||
Reference in New Issue
Block a user