Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node18 is not a valid run.uses value #28

Closed
garrytrinder opened this issue Jul 16, 2023 · 6 comments
Closed

node18 is not a valid run.uses value #28

garrytrinder opened this issue Jul 16, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@garrytrinder
Copy link
Member

In actions.yml we reference node18, but this breaks the yaml schema validation.

https://github.com/pnp/action-cli-login/blob/dda9848b627844079f147a5291963140eac9c28b/action.yml#L26C18-L26C18

image

runs.uses should be either node12 or node16.

image

Schema https://json.schemastore.org/github-action.json

/cc @milanholemans apologies, I missed this in the review 😞

@garrytrinder garrytrinder added the bug Something isn't working label Jul 16, 2023
@milanholemans
Copy link
Contributor

milanholemans commented Jul 16, 2023

That's a shame. Is there no way for us to let it run using Node18? Since the CLI requires Node18 as a minimum, it doesn't seem logical to leave this on Node16.

Can't we use actions/setup-node@v3 to setup our own Node version?

@garrytrinder
Copy link
Member Author

Since the CLI requires Node18 as a minimum, it doesn't seem logical to leave this on Node16.

IIRC, you can run the CLI on node@16 just fine, but node@18 is required for development of the CLI.

Can't we use actions/setup-node@v3 to setup our own Node version?

I don't think this is relevant in this context. The action.yml represents the metadata of the action, it is not a GitHub workflow.

garrytrinder added a commit to garrytrinder/action-cli-login that referenced this issue Jul 17, 2023
@milanholemans
Copy link
Contributor

IIRC, you can run the CLI on node@16 just fine, but node@18 is required for development of the CLI.

Not only for development but also to use the CLI. It's possible that it works on Node16, but there is no guarantee since we don't test anything on Node16 anymore.

https://pnp.github.io/cli-microsoft365/user-guide/installing-cli#prerequisites

@garrytrinder
Copy link
Member Author

Thanks for clarifying.

As you can see I’ve reverted the change to resolve the validation error.

If using node@16 becomes an issue, then we should maybe look to move to Docker style actions where we can define the runtime environment to our needs.

https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action#creating-a-dockerfile

@garrytrinder
Copy link
Member Author

node12 is going away and the only option will be node16

https://github.blog/changelog/2023-07-17-github-actions-removal-of-node12-from-the-actions-runner/

Also, we should track this issue actions/runner#2619 which is asking for latest node support.

@milanholemans
Copy link
Contributor

https://github.com/orgs/community/discussions/53217#discussioncomment-6227341

This might work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants