From b110dac84d348e5bdc64d04e7631524e40d6584f Mon Sep 17 00:00:00 2001 From: Mark Iannucci Date: Mon, 5 Dec 2022 22:57:20 -0700 Subject: [PATCH] Add link to context availability for workflow `.if` key syntax (#22437) Co-authored-by: Lucas Costi --- .../using-workflows/workflow-syntax-for-github-actions.md | 2 +- data/reusables/actions/if-supported-contexts.md | 1 + .../jobs/section-using-conditions-to-control-job-execution.md | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 data/reusables/actions/if-supported-contexts.md diff --git a/content/actions/using-workflows/workflow-syntax-for-github-actions.md b/content/actions/using-workflows/workflow-syntax-for-github-actions.md index 38dc4162e6..e6e11c2ff5 100644 --- a/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -320,7 +320,7 @@ A unique identifier for the step. You can use the `id` to reference the step in ### `jobs..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)." diff --git a/data/reusables/actions/if-supported-contexts.md b/data/reusables/actions/if-supported-contexts.md new file mode 100644 index 0000000000..6b7c41c0a3 --- /dev/null +++ b/data/reusables/actions/if-supported-contexts.md @@ -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)." \ No newline at end of file diff --git a/data/reusables/actions/jobs/section-using-conditions-to-control-job-execution.md b/data/reusables/actions/jobs/section-using-conditions-to-control-job-execution.md index 320d0c311a..1193172cdd 100644 --- a/data/reusables/actions/jobs/section-using-conditions-to-control-job-execution.md +++ b/data/reusables/actions/jobs/section-using-conditions-to-control-job-execution.md @@ -1,4 +1,4 @@ -You can use the `jobs..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..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)."