You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't seem like actions/setup-node#26 will get resolved any time soon. There are other features requested (incl. PRs open) that don't seem to be getting the attention they deserve.
Should Node.js have an official action of its own?
This way we could implement the keywords support, and possibly we could recommend a different default matrix to the users.
The default matrix does have a tradeoff - right now,
a maintainer has to add new versions each time, if we recommended, say [ lts-1, lts, latest ] as the default, then the tested versions would drop off without notice, but I figure that testing in latest versions is more valuable than testing in unsupported versions, even if breaking that support means the need to bump semver major.
I've got the node/matrix and node/install actions under https://github.com/ljharb/actions, the latter of which uses nvm. It currently doesn't support windows but only because i haven't gotten around to it. I use it on all 2-300 of my projects. nvm supports lts/*, lts/argon etc, and lts/-1 etc.
Without the shareable workflows that's a lot of boilerplate to copy/paste... And shareable workflows got bumped to Q3.
Not saying we shouldn't recommend it, just that the matrix is still a burden... Any chance you managed to get around to automating the maintenance of distributing the boilerplate?
Also it's not that you're a some random dude online, but part of the reason why I raised this is to see if it would be useful to make it "official"?
Well, once there's shareable workflows, there's still the benefit of having this moved out into a community... If we can form a community around it specifically.
That said, I wouldn't hold my breath waiting for the shareable workflows...
True enough, but that it took so long to do something so basic suggests that indeed we need something owned by the community.
Sure, fair enough. It's also probably indicative of community need (or lack thereof) that a solution didn't gain traction over actions/setup-node despite it taking 2 years to actually ship that feature.
Very true. I think that it wasn't until travis changed their pricing - last November - that Actions really became the solution of choice, and in the intervening time, I created my own solution for my hundreds of packages, and I think others just manually made a matrix.
In other words, I think there's community need, but it's very difficult for anything non "standard" to gain traction.
yeah, this is basically the solution I used for everything. I'll slowly update my files to not be like this anymore. It worked but had a maintenance burden, which the new update relatively solves.
In other words, I think there's community need, but it's very difficult for anything non "standard" to gain traction.
If that's the case, do you think it's a worthwhile investment of our time to work on this? I am perpetually concerned about spreading ourselves over many projects and having a mediocre execution vs. focusing on a few projects and doing them well.
Well, I did add a repo for pkgjs/action - I just haven't had a chance to start any discussions there, but I would hope that as a wrapper layer around actions/setup-node we'd be able to solve at least some problems, as opposed to straight out fork, esp. given the concerns that the official action is a part of a broader commercial offering and it is after all "official", so indeed overcoming that inertia would be really tricky.
Either way, it also seems that actions/setup-node does have some renewed activity, so maybe this particular issue is best closed and offloaded to pkgjs/action.
Note that I did create an action that automatically makes a matrix :-) but nobody besides me has adopted it.
That's because the ergonomics of achieving that are really not pretty... :( I can't advocate for it in good conscience :D And then you still have to maintain the yaml boilerplate (it will have to evolve over time, won't it?). Maaaybe packaging that up as an npm package to simplify the distribution is an option? github/roadmap#98 was originally scheduled for Q2, then rescheduled for Q3, but it's really hard to guess if it's any closer...
But even without the reusable workflows - having an explicit option in the workflows API to just load the matrix variables from an external URL would solve 99% of the problem... But I have no idea how to reach the people who can influence an implementation of such a thing.
No, the boilerplate and action need no further changes forever. I agree it’s not super ergonomic, but I’m hoping that can change as GHA adds reuse features.
At the risk of veering just slightly off topic - spotted this on one of the GHA issues: actions/runner#834 (comment) - basically, it's a suggestion to work around the lack of if inside composite actions by generating the action and executing it (effectively an eval) - I wonder if that could work to also do the matrix?
honestly, if we were to approach this I'd really recommend that we take the approach that Twitter Together takes where the action you add is actually a meta action that manages your other actions.
the DX of this is rather nice, and allows you to centrally manage updates a bit more effectively.
When you want to update the CI action, you update the configuration the Controller action commits, and either have it on a cron or manually runnable to update the committed CI action.
What you're saying would work, but it'd create a ton of extra commit noise, and you wouldn't be able to test the action changes against the repo before committing them (when making changes to the controller)
Activity
ljharb commentedon Apr 25, 2021
I've got the
node/matrixandnode/installactions under https://github.com/ljharb/actions, the latter of which uses nvm. It currently doesn't support windows but only because i haven't gotten around to it. I use it on all 2-300 of my projects. nvm supportslts/*,lts/argonetc, andlts/-1etc.In other words, even if folks wanted to use setup-node, they could still use my matrix action to automatically support whatever versions they like. Here's an example: https://github.com/ljharb/unbox-primitive/blob/main/.github/workflows/node-4%2B.yml#L6-L23
dominykas commentedon Apr 25, 2021
Without the shareable workflows that's a lot of boilerplate to copy/paste... And shareable workflows got bumped to Q3.
Not saying we shouldn't recommend it, just that the matrix is still a burden... Any chance you managed to get around to automating the maintenance of distributing the boilerplate?
Also it's not that you're a some random dude online, but part of the reason why I raised this is to see if it would be useful to make it "official"?
ljharb commentedon Apr 25, 2021
No, I still haven't solved that, unfortunately.
tbh I think that once there's shareable workflows, there's a lot less value in having an official one.
dominykas commentedon Apr 26, 2021
Well, once there's shareable workflows, there's still the benefit of having this moved out into a community... If we can form a community around it specifically.
That said, I wouldn't hold my breath waiting for the shareable workflows...
[-]Let's fork `actions/setup-node`?[/-][+]Community maintenance of `actions/setup-node`?[/+]bnb commentedon Sep 7, 2021
FWIW it seems like the root point in this issue (actions/setup-node#26) was addressed: actions/setup-node#26 (comment)
ljharb commentedon Sep 7, 2021
True enough, but that it took so long to do something so basic suggests that indeed we need something owned by the community.
bnb commentedon Sep 7, 2021
Sure, fair enough. It's also probably indicative of community need (or lack thereof) that a solution didn't gain traction over
actions/setup-nodedespite it taking 2 years to actually ship that feature.ljharb commentedon Sep 7, 2021
Very true. I think that it wasn't until travis changed their pricing - last November - that Actions really became the solution of choice, and in the intervening time, I created my own solution for my hundreds of packages, and I think others just manually made a matrix.
In other words, I think there's community need, but it's very difficult for anything non "standard" to gain traction.
bnb commentedon Sep 7, 2021
yeah, this is basically the solution I used for everything. I'll slowly update my files to not be like this anymore. It worked but had a maintenance burden, which the new update relatively solves.
If that's the case, do you think it's a worthwhile investment of our time to work on this? I am perpetually concerned about spreading ourselves over many projects and having a mediocre execution vs. focusing on a few projects and doing them well.
ljharb commentedon Sep 7, 2021
Note that I did create an action that automatically makes a matrix :-) but nobody besides me has adopted it.
Yes, I do think it's worthwhile, but I can't speak to prioritization.
dominykas commentedon Sep 26, 2021
Well, I did add a repo for
pkgjs/action- I just haven't had a chance to start any discussions there, but I would hope that as a wrapper layer aroundactions/setup-nodewe'd be able to solve at least some problems, as opposed to straight out fork, esp. given the concerns that the official action is a part of a broader commercial offering and it is after all "official", so indeed overcoming that inertia would be really tricky.Either way, it also seems that
actions/setup-nodedoes have some renewed activity, so maybe this particular issue is best closed and offloaded topkgjs/action.That's because the ergonomics of achieving that are really not pretty... :( I can't advocate for it in good conscience :D And then you still have to maintain the yaml boilerplate (it will have to evolve over time, won't it?). Maaaybe packaging that up as an npm package to simplify the distribution is an option? github/roadmap#98 was originally scheduled for Q2, then rescheduled for Q3, but it's really hard to guess if it's any closer...
But even without the reusable workflows - having an explicit option in the workflows API to just load the matrix variables from an external URL would solve 99% of the problem... But I have no idea how to reach the people who can influence an implementation of such a thing.
ljharb commentedon Sep 26, 2021
No, the boilerplate and action need no further changes forever. I agree it’s not super ergonomic, but I’m hoping that can change as GHA adds reuse features.
dominykas commentedon Sep 27, 2021
At the risk of veering just slightly off topic - spotted this on one of the GHA issues: actions/runner#834 (comment) - basically, it's a suggestion to work around the lack of
ifinside composite actions by generating the action and executing it (effectively aneval) - I wonder if that could work to also do the matrix?bnb commentedon Sep 27, 2021
honestly, if we were to approach this I'd really recommend that we take the approach that Twitter Together takes where the action you add is actually a meta action that manages your other actions.
the DX of this is rather nice, and allows you to centrally manage updates a bit more effectively.
ljharb commentedon Sep 27, 2021
I'm not sure if it would work, since i think the matrix config needs to be statically available to GHA.
bnb commentedon Sep 27, 2021
@ljharb what about an action committing a static action wouldn't work?
bnb commentedon Sep 27, 2021
basically:
When you want to update the CI action, you update the configuration the Controller action commits, and either have it on a cron or manually runnable to update the committed CI action.
ljharb commentedon Sep 27, 2021
@bnb oh sorry, i was replying to #462 (comment)
What you're saying would work, but it'd create a ton of extra commit noise, and you wouldn't be able to test the action changes against the repo before committing them (when making changes to the controller)
bnb commentedon Sep 27, 2021
have the controller PR rather than directly commit :P
ljharb commentedon Sep 27, 2021
Maybe I'm misunderstanding, but that would be multiple steps:
You wouldn't be able to test step 1 until after it was completed.
bnb commentedon Sep 27, 2021
what do you need to test in step 1?
ljharb commentedon Sep 27, 2021
I'd be using this controller on 300 projects. I'd want to make sure that I wasn't about to create 300 failing PRs.
bjohansebas commentedon Mar 20, 2025
This issue is too old. Do we still believe community support is needed for this action? Maybe it's time to close this issue.