Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/reusable-ci-astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ on:
type: string
default: '24'
pnpm-version:
description: >-
pnpm version for `pnpm/action-setup`. Empty, the default, makes the
action read `packageManager` from the caller's package.json, which
keeps CI on the version the repository actually pins. Set it only for
a repository that has no `packageManager` field.
Comment on lines +19 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: same wording as the node workflow, and it matters more here since cache-dependency-path documents the sub-package layout explicitly.

Suggested change
pnpm version for `pnpm/action-setup`. Empty, the default, makes the
action read `packageManager` from the caller's package.json, which
keeps CI on the version the repository actually pins. Set it only for
a repository that has no `packageManager` field.
pnpm version for `pnpm/action-setup`. Empty, the default, makes the
action read `packageManager` from the package.json at the repository
root (not the one under `working-directory`), which keeps CI on the
version the repository actually pins. Set it only for a repository
whose root package.json has no `packageManager` field.

type: string
default: '10'
default: ''
install-args:
type: string
default: '--frozen-lockfile'
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/reusable-ci-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ on:
type: string
default: '24'
pnpm-version:
description: 'pnpm version'
description: >-
pnpm version for `pnpm/action-setup`. Empty, the default, makes the
action read `packageManager` from the caller's package.json, which
keeps CI on the version the repository actually pins. Set it only for
a repository that has no `packageManager` field.
Comment on lines +28 to +31

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "the caller's package.json" is ambiguous for the monorepo case this workflow explicitly supports. defaults.run.working-directory does not apply to uses: steps, so pnpm/action-setup reads package_json_file: package.json at the repo root, never working-directory's. That is the right file for a pnpm workspace (the root holds the pin), but a caller with working-directory: apps/web and no root packageManager will get "No pnpm version is specified" from a file they weren't looking at.

Suggested change
pnpm version for `pnpm/action-setup`. Empty, the default, makes the
action read `packageManager` from the caller's package.json, which
keeps CI on the version the repository actually pins. Set it only for
a repository that has no `packageManager` field.
pnpm version for `pnpm/action-setup`. Empty, the default, makes the
action read `packageManager` from the package.json at the repository
root (not the one under `working-directory`), which keeps CI on the
version the repository actually pins. Set it only for a repository
whose root package.json has no `packageManager` field.

type: string
default: '10'
default: ''
package-manager:
description: 'Package manager (pnpm, npm, yarn)'
type: string
Expand Down
Loading