I want check if the commit message is not [RELEASE] but [PATCH], [MINOR] or [MAJOR]. I define all as Environment Variables.
`But when I run the workflow i get the error: Unrecognized named-value: 'env'. Located at position 1 within expression: env.PATCH == 'true'
What I'm doing wrong?
Thanks for help
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
PATCH: ${{ startsWith(github.event.head_commit.message, '[PATCH]') || 'false' }}
MINOR: ${{ startsWith(github.event.head_commit.message, '[MINOR]') || 'false' }}
MAJOR: ${{ startsWith(github.event.head_commit.message, '[MAJOR]') || 'false' }}
if: "!startsWith(github.event.head_commit.message, '[RELEASE]') && (${{ env.PATCH == 'true' }} || ${{env.MINOR == 'true' }} || ${{ env.MAJOR == 'true' }})"
I hope somebody can fix my Line of Code.