Skip to content

Add link to context availability for workflow .if key syntax #22437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 6, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ A unique identifier for the step. You can use the `id` to reference the step in

### `jobs.<job_id>.steps[*].if`

You can use the `if` conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.
You can use the `if` conditional to prevent a step from running unless a condition is met. {% data reusables.actions.if-supported-contexts %}

{% data reusables.actions.expression-syntax-if %} For more information, see "[Expressions](/actions/learn-github-actions/expressions)."

Expand Down
1 change: 1 addition & 0 deletions data/reusables/actions/if-supported-contexts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You can use any supported context and expression to create a conditional. For more information on which contexts are supported in this key, see "[Context availability](/actions/learn-github-actions/contexts#context-availability)."
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
You can use the `jobs.<job_id>.if` conditional to prevent a job from running unless a condition is met. You can use any supported context and expression to create a conditional.
You can use the `jobs.<job_id>.if` conditional to prevent a job from running unless a condition is met. {% data reusables.actions.if-supported-contexts %}

{% data reusables.actions.expression-syntax-if %} For more information, see "[Expressions](/actions/learn-github-actions/expressions)."

Expand Down