Skip to content

How to install yarn? #11190

@rafael-unloan

Description

@rafael-unloan

Hi, I have a workflow that requires yarn, typescript, etc. I want the agent to only finish the session once all the code compile and all the tests pass.

I've tried defining steps like this:

steps:

    - name: Setup node environment
      uses: actions/setup-node
      with:
        node-version-file: '.nvmrc'
        registry-url: https://npm.pkg.github.com/
        scope: '@my-org'
        package-manager-cache: false

    - name: Enable corepack
      shell: bash
      run: |
        corepack enable

engine: copilot

tools:
  edit:
  bash:
    - "cd:*"
    - "rg:*"
    - "git:*"
    - "corepack:*"
    - "yarn:*"
    - "pnpm:*"
    - "cat:*"
    - "ls:*"
    - "head:*"
    - "tail:*"
    - "find:*"
    - "grep:*"
    - "wc:*"
    - "sed:*"
    - "xargs:*"

safe-outputs:
  create-pull-request:
    title-prefix: "chore(feature-flag-cleanup): "
    labels: [feature-flag-cleanup, automation]
    draft: true
---

# Feature Flag Cleanup

Remove the feature flag `${{ github.event.inputs.feature_flag_key }}` from the codebase.

Jira Ticket: ${{ github.event.inputs.jira_ticket }}

Make sure all the tests pass via running `yarn root:test` before finishing this session.

## Final Step

After all changes are complete and validated, create a pull request using `safe-outputs.create-pull-request`. Do not use the GitHub CLI or API directly - the safe-outputs mechanism will handle PR creation automatically when you're done.

I can see that it successfully installs all my modules, etc.

Image

However, when it comes to the agent actually executing the prompt, it doesn't have the environment setup. It still tries to install yarn (to no avail):

Image

How am I supposed to do this?

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions