-
Notifications
You must be signed in to change notification settings - Fork 15
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
Improve the ordering of GHA workflow fields #399
Improve the ordering of GHA workflow fields #399
Conversation
Thanks for the PR. I'm not opposed to making this change, but I need to do some testing and see how this impacts our pipelines. I assume that it shouldn't change any functionality, just the readability of the YAML. In the meantime, I would also suggest that you add comments above the struct explaining the struct (maybe how it maps to the GHA YAML) and making a note that order is intentional for the reason you shared. Just a sentence or two should be plenty. Otherwise, I could see someone accidentally changing this in the future, or possibly a formatter reshuffling them. |
Addressed your review. Thank you! |
Summary
When building the YAML file (GHA workflow) using the workflow structs defined in
./octo/actions/**
, IF conditional is placed above the step name. This behaviour is not optimal as it's much easier to read workflows where conditionals are used below the step name. This can be easily fixed by switching the fields in the defined structs.Examples of workflows used in acknowledged repositories where conditional is placed below the name, proving the common practice:
Checklist