peter-evans / autopep8

A GitHub action for autopep8, a tool that automatically formats Python code to conform to the PEP 8 style guide.
MIT License
84 stars 15 forks source link

Fix evaluation in if-clause in Example #55

Closed BenjaminRodenberg closed 3 years ago

BenjaminRodenberg commented 3 years ago

Following syntax from https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif

I tried to run a similar case without the ${{ ... }} as suggested in the original example, but the if never evaluated true. I'm not very experienced with github actions. Therefore, if this is not a obvious case, I can also provide an example.

peter-evans commented 3 years ago

Hi @BenjaminRodenberg

In my experience it works either way. It also says so at the link you provided:

When you use expressions in an if conditional, you may omit the expression syntax (${{ }}) because GitHub automatically evaluates the if conditional as an expression.

Thanks for raising the PR but I think I'll leave it without brackets.