Skip to content

Please document the evaluation priorities of operators #41250

@fabricetriboix

Description

@fabricetriboix

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/workflows-and-actions/expressions

What part(s) of the article would you like to see updated?

Hello,

This page documents expressions supported by GitHub Actions. However, it doesn't explain the evaluation priorities of the various operators. For example, in C/C++, && has priority over ==, so an expression like

a == b && c

will certainly not yield the intended result. In C/C++, you probably want to write something like this:

(a == b) && c

But I have seen workflow files containing expressions such as

a == b && c

and apparently yielding the expected result.

Please clarify this by documenting the operators' priorities.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamgithub_actionsPull requests that update GitHub Actions code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions