-
Notifications
You must be signed in to change notification settings - Fork 62.6k
Description
What article on docs.github.com is affected?
https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
What part(s) of the article would you like to see updated?
-
Under the section
jobs.<job_id>.steps.run
in the subsection Exit codes and error action preference: Under the bullet point forcmd
, the second item starts out "cmd.exe will exit with the error level of the last program it executed, and it will and return the error code to the runner." The second "and" is extraneous and should be deleted. -
The last sentence in the section
jobs.<job_id>.steps.with.entrypoint
reads "The entrypoint keyword is meant to use with Docker container actions, but you can also use it with JavaScript actions that don't define any inputs." "to use" should be changed to "to be used". -
This is a general comment about the syntax of the syntax article: Since, for the most part, the YAML used in workflow files can be considered a form of JSON, it indeed makes some sense to use JavaScript-like syntax to refer to the parts of the YAML file. For example,
jobs.<job_id>.timeout-minutes
clearly refers to the value corresponding to thetimeout-minutes
key in the hash value corresponding to the<job_id>
key in the hash value corresponding to thejobs
key, and this is precisely how you would refer to it in JavaScript. Where it gets confusing is in notations such asjobs.<job_id>.steps.timeout-minutes
. This is because the value corresponding to thesteps
key is not another hash but rather an array (of steps). Using the dot notation obscures the fact that in this case,timeout-minutes
applies to a particular step and doesn't apply to the set of steps as a whole. It would be clearer to write something likejobs.<job_id>.steps[n].timeout-minutes
to make clear thattimeout-minutes
applies only to some particular stepn
and not to all steps. The[n]
here stands in for any step in the sequence analogously to the way<job_id>
stands in for some particular key in thejobs
hash.