Skip to content

Commit 266bab6

Browse files
authored
Update control jobs with conditions documentation
Clarify usage of conditions in job execution and note limitations for shell conditions.
1 parent affd6e0 commit 266bab6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

content/actions/how-tos/write-workflows/choose-when-workflows-run/control-jobs-with-conditions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ category:
1515
contentType: how-tos
1616
---
1717

18-
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 %}
18+
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 %}
19+
20+
Note that conditions executed by a shell (for example `[[ $variable == "prefix"* ]]`) can not be evaluated in `jobs.<job_id>.if`. Such conditions must be written inside `jobs.<job_id>.steps[*].run`.
1921

2022
### Example: Only run job for a specific repository
2123

0 commit comments

Comments
 (0)