Replies: 1 comment 1 reply
-
|
Update — here's what worked for me: After a lot of trial and error, the approach that worked was skipping
---
steps:
- name: Setup pnpm
run: |
PNPM_VERSION=$(node -e "process.stdout.write(require('./package.json').packageManager.split('@')[1].split('+')[0])")
sudo npm install -g pnpm@$PNPM_VERSION
---Then in the workflow frontmatter, import it and allow network:
allowed:
- node
- registry.npmjs.org
- github.com
imports:
- shared/pnpm.md
steps:
- name: Run pnpm install
run: |
pnpm install --frozen-lockfile
pnpm buildThe shared component runs before the agent prompt, so pnpm is on which pnpm && pnpm --versionAnd a guardrail instructing the agent to halt immediately if pnpm is not found, rather than trying to self-heal (which it will attempt otherwise). Does anyone have a better approach? Specifically curious about:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Questions:
Is copilot-setup-steps.yml the right place to install
pnpmso the agent picks it up?Should I create my own custom yml then import into my frontmatter?
Are there any restrictions on which actions can be used as setup steps? Is there anything special needed after pnpm/action-setup — like also running setup-node with cache: 'pnpm' — so the agent actually resolves
pnpmin its PATH?Any examples of a working
pnpmsetup would be hugely appreciated!I have tried many ways and as of yet not been successful -- sometimes the agent finds its own way to install pnpm, but I would like to optimize this.
Beta Was this translation helpful? Give feedback.
All reactions