Skip to content

Action overrides @actions/setup-node step, when setup comes after. #2

@kopepasah

Description

@kopepasah

This Action uses @actions/setup-node in order to run the install of @wordpress/env and setup of the environment. Because of this, the Node versions are set to what is provided by this Action, when the Action step comes after another @actions/setup-node in a workflow.

For example, the following workflow config results in Node version lts/* (as of right now is 18, and is not expected).

- name: Setup Node
  uses: actions/setup-node@v3
  with:
    node-version: 16

- name: Setup wp-env
  uses: godaddy-wordpress/setup-wp-env@v1

On the other hand, the following workflow config results in Node version 16 (which is expected).

- name: Setup wp-env
  uses: godaddy-wordpress/setup-wp-env@v1

- name: Setup Node
  uses: actions/setup-node@v3
  with:
    node-version: 16

Because this Action requires node, we must add an input for the user to provide options to @actions/setup-node config OR do not run @actions/setup-node when node is already setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions