Skip to content

Need help with env GitHub Action and check conditions #26000

Answered by Yanjingzhu
calvertwong asked this question in Actions
Discussion options

You must be logged in to vote

Let me add something in addition.
Firstly, when you use expressions in an if conditional, you may omit the expression syntax ( ${{ }} ) because GitHub automatically evaluates the if conditional as an expression.
You could use :

if: env.DEBUG_BUILD_SUCCESS == 'true' && env.RELEASE_BUILD_SUCCESS == 'true'

Secondly, env context only include environment variables which is set in Job level env or set env command. For DEBUG_BUILD_SUCCESS and RELEASE_BUILD_SUCCESS , you need to set it to environment variable before you use it in if conditional.
I am not sure how you confirm whether artifact exist or not. I you want to execute the send email steps based on the build step failed or succeeded, you…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants