godaddy-wordpress / godaddy-wordpress/setup-wp-env

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

Open
#2 1 comment 1 reaction 0 assignees View on GitHub
bug good first issue help wanted
Dominant language
No language data
Stars
17
Forks
0
PR merge metrics
No merged PRs in 30d

Description

This Action uses [@actions/setup-node](https://github.com/actions/setup-node) in order to run the install of [@wordpress/env](https://github.com/WordPress/gutenberg/tree/trunk/packages/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](https://github.com/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).

```yaml
- 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).

```yaml
- 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](https://github.com/actions/setup-node) config OR do not run [@actions/setup-node](https://github.com/actions/setup-node) when node is already setup.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.