mpalmer / action-validator

Tool to validate GitHub Action and Workflow YAML files
GNU General Public License v3.0
277 stars 23 forks source link

Support conditional execution of steps #16

Closed satanabe1 closed 1 year ago

satanabe1 commented 2 years ago

https://github.blog/changelog/2021-11-09-github-actions-conditional-execution-of-steps-in-actions/

Actions written in YAML, also known as composite actions, now support if conditionals. This lets you prevent specific steps from executing unless a condition has been met. Like steps defined in workflows, you can use any supported context and expression to create a conditional.

🎊

mpalmer commented 1 year ago

Thanks for submitting this. I've reworked how the JSON schemas that form the core of action-validator are included, and the latest versions appear to now support this syntax. If the next release of action-validator doesn't work correctly on your real-world workflows, please feel free to adjust test/005_conditional_step_in_action/action.yml to show what's failing, and I'll take a look.