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

every step must define a uses or run key #2

Closed
neutmute opened this issue Nov 20, 2019 · 3 comments
Closed

every step must define a uses or run key #2

neutmute opened this issue Nov 20, 2019 · 3 comments

Comments

@neutmute
Copy link

Hey there
Thank you for this plugin. I've tried taking it and commiting it to my repo, adding the AWS secrets etc but github refuses to run it. The error is

every step must define a uses or run key

image

I have literally the same file as in the documented sample except for lines 23 to 25 where I made some obvious string literal changes to suit my env - the version_label is hardcoded to 1

        application_name: MyApplicationName
        environment_name: MyApplication-Environment
        version_label: 12345

Any suggestions?

@einaregilsson
Copy link
Collaborator

einaregilsson commented Nov 20, 2019

Ok, I looked into it and the example had an error. It had:

    - name: Checkout source code
    - uses: actions/checkout@v1

So both - name and - uses started with a -, which lets yaml interpret them as seperate items. It should have been:

    - name: Checkout source code
      uses: actions/checkout@v1

which says that it's one item with a name, and the uses belongs to the same step. I've updated the example. Also, you should use the v3 of the action now, it has some improvements around handling errors. I've updated the example to also use that. (Or you can use master although then there might be breaking changes at some point).

@neutmute
Copy link
Author

Fantastic - thanks very much.

@coolcorexix
Copy link

If you are using VSC, I recommend using this extension - it helped validate the yaml file
https://marketplace.visualstudio.com/items?itemName=me-dutour-mathieu.vscode-github-actions

Turtle-Hwan added a commit to cleaner00/PLEA-STREET that referenced this issue Nov 26, 2021
einaregilsson/beanstalk-deploy#2

Error : .github#L1 every step must define a `uses` or `run` key
sungik-choi added a commit to sungik-choi/bezier-react that referenced this issue Jul 5, 2022
rosenfrantz added a commit to rosenfrantz/testing_actions that referenced this issue Sep 1, 2022
- makes it [interpreted as separate items](einaregilsson/beanstalk-deploy#2 (comment)) ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants