How do I use multiple "uses" in a named step #26573
-
Try to set the npm version from the the reference that triggers the actions with the following script
Github complains about duplicate key “uses”. I’m clearly missing something. I can do this just fine in an unnamed step:
How do I fix my Set-Version step so that it can use both actions/checkout and actions/setup-node? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Each step can only execute a single action. A “uses” statement is executing an action, such as the Checkout action or the setup-node action. You can’t combine them into one step like you are doing. They have to be two steps:
|
Beta Was this translation helpful? Give feedback.
-
Thank you! That clears things up and I got my actions working. |
Beta Was this translation helpful? Give feedback.
Each step can only execute a single action. A “uses” statement is executing an action, such as the Checkout action or the setup-node action. You can’t combine them into one step like you are doing. They have to be two steps:
name: Set Version
uses: actions/setup-node@v2