Skip to content

How can I test if secrets are available in an action? #26726

Answered by Yanjingzhu
paulb777 asked this question in Actions
Discussion options

You must be logged in to vote

You can only use the env context in the value of the with and name keys, or in a step’s if conditional.

It is not supported to use env in job’s if  conditional. 

And screrts context could not be used in if conditional, neither job’s if  nor  step’s if  .

So, it is not possible to disable a job by identifying secrets . I am afraid that you need to add if contional to each steps.  Sorry for any inconvenience. 

Replies: 14 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@dwertent
Comment options

@itsalaidbacklife
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@TomerFi
Comment options

Comment options

You must be logged in to vote
1 reply
@tomas-pajurek
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment